Hi Folks,

Here is the code I've been trying to use in VC++ 6.0:

#include <iostream.h>

void main() {
cout << "Test" << endl;
int number;
cin >> number;
if (number == 0)
system("exit");

}

I want the console window to close automatically if the user inputs 0. So far, the application stops and "press any key to continue" appears after inputting 0. Any clues to what I'm doing wrong?