How to access command line arguments within the code?
Answers
Answered by
0
Type its name, a space, then some arguments before you hit ENTER. See if your code is processing the args OK. (make sure main looks like: int main(int argc, char *argv[]) then in main() have a statement: cout << argv[1] << endl ; that should print the first word you type after the name of the EXE file.
Similar questions
Math,
6 months ago
English,
6 months ago
Accountancy,
1 year ago
English,
1 year ago
English,
1 year ago