Why int main( int argc, char* args[] )??

Apr 1, 2013 at 1:09am
1
2
3
4
int main( int argc, char* args[] )
{
     return 0;
}

I'm learning SDL right now, and every tutorial I come across says not to worry about the parameters of the main function. An explanation from someone would really be appreciated!
Apr 1, 2013 at 1:12am
Those variables are the command line used to execute your program.

IE, if the user launches your program with the following from the commandline:
myprogram.exe -fullscreen somefile.sav

The parameters will have the below values:
1
2
3
4
argc = 3
args[0] = "myprogram.exe"
args[1] = "-fullscreen"
args[2] = "somefile.sav"
Apr 1, 2013 at 1:16am
Thanks Disch!
Topic archived. No new replies allowed.