| exit() doesn't work [message #761740] |
Tue, 06 December 2011 20:06 |
patrav2273 Messages: 1 Registered: December 2011 |
Junior Member |
|
|
Hi,
I am new to C++ programming in Eclipse. I wrote a small code to open a text file. And basically tell the program to exit if the file couldn't be opened:
if(input.fail())
{
cout << "The file couldn't be opened. The program is being terminated." << endl;
exit();
}
But the exit() doesn't work. This function works fine in the Microsoft Visual C++ 2008 Express. Can anyone help?
|
|
|
Powered by
FUDForum. Page generated in 0.01608 seconds