argc is the number of argument strings in the argv array.
Here's an example to get you started:
1 2 3 4 5 6 7 8 9 10 11 12
int main( int argc, char* argv )
cout << "The name used to start the program: " << argv[ 0 ]
<< "\nArguments are:\n";
for (int n = 1; n < argc; n++)
cout << setw( 2 ) << n << ": " << argv[ n ] << '\n';
Compile it, then from the command-prompt try running it different ways:
D:\prog\test> a Hello world!
The name used to start the program: a
D:\prog\test> cd ..
D:\prog> test\a.exe "Peter Piper" picked a peck of "pickled peppers"
The name used to start the program: test\a.exe
1: Peter Piper
6: pickled peppers
Inside the main, it uses argc and *argv and I need to call it from the console like what Duoas displayed. However, I can't even compile/build it. It works with the make command of linux though so the code is fine. Eventually, I will want to hard code the main such that it'll take imageIN and output imageOUT automatically since I'll be testing it a lot.
Um, I don't think you can do that with main()...you will have to use argv to handle that...Anyway, are you looking in the directory where it is built? There should be a Debug or Release folder that the .exe is stored in.