Think about it this way: argc is an int given to your program representing the number of command line arguments (including the program name). Thus for foo bar bas, argc = 3. argv, on the other hand, is a character array representing the arguments themselves. Thus, argv[0] is your program's name. For foo bar bas, argv[0] = "foo", argv[1] = "bar", and argv[2] = "bas". When VC++ compiles your program, it by default provides no arguments. Thus your program recognizes this and quits.