|
-
February 22nd, 2010, 09:52 PM
#1
command line arguments function
I'm having an issue with writing the body statements for a function called create_names which purpose is to create the names for all of the files (my guess the output files).
Here is the function "create_names"
Code:
void create_names(int argc, char* argv[], string& iFileName,
string& oFileNameAll, string& oFileNameGood,
string& oFileNameSmall, string& oFileNameRepeat)
When I execute a program as ./MyProgram.exe xyz, xyz is the prefix for my files.
If the input name is xyz, the input will be xyz.txt. I'm suppose to build the output names as xyz_output_all.txt, xyz_output_good.txt, xyz_output_small.txt and xyz_output_repeat.txt.
------------------------------------------------------
Can someone just explain to me how am I suppose to use the string& to create the files? Am i suppose to use an ofstream object and use that to create an empty text file?
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
|