Computer Science, asked by Jananii9708, 1 year ago

How to access command line arguments within the code?

Answers

Answered by Akhilrajput1
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