Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » CDT » exit() doesn't work
exit() doesn't work [message #761740] Tue, 06 December 2011 20:06
patrav2273 is currently offline 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?
Previous Topic:Getting Started - Link not found
Next Topic:Error While Installing CDT for Indigo
Goto Forum:
  


Current Time: Fri May 24 17:11:34 EDT 2013

Powered by FUDForum. Page generated in 0.01608 seconds