|
-
Jan 23rd, 2002, 07:25 AM
#1
Thread Starter
Hyperactive Member
concatenate argv
What's the best way to concatenate the argv parameter of the
main function in order to build a full path name with spaces in it?
eg.
MyProgram.exe C:\Base Directory\Directory 2\Filename w spaces.txt
in this example, argc would equal 6. I would like to concatenate
all the argv's in order to build one large string. What's the best
way to do this?
Thanks
Bababooey
Tatatoothy
Mamamonkey
-
Jan 23rd, 2002, 07:58 AM
#2
Thread Starter
Hyperactive Member
nm, i developed a quick way to do it
thx anyways
Bababooey
Tatatoothy
Mamamonkey
-
Jan 23rd, 2002, 12:45 PM
#3
Monday Morning Lunatic
The best way is just to surround the path name in quotes, and then it will automatically end up as a single string:
Code:
MyProgram.exe "C:\Base Directory\Directory 2\Filename w spaces.txt"
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|