Unresolved inclusion: <iostream> [message #638389] |
Thu, 11 November 2010 07:40 |
No real name Messages: 1 Registered: November 2010 |
Junior Member |
|
|
I have installed CygWin with all the necessary packages, and Eclipse with CDT, and I'm trying my hand at some C++ ...
Now I got this little program from http://www.cprogramming.com/tutorial/lesson2.html
#include <iostream>
using namespace std;
int main() // Most important part of the program!
{
int age; // Need a variable...
cout<<"Please input your age: "; // Asks for age
cin>> age; // The input is put in age
cin.ignore(); // Throw away enter
if ( age < 100 ) { // If the age is less than 100
cout<<"You are pretty young!\n"; // Just to show you it works...
}
else if ( age == 100 ) { // I use else just to show an example
cout<<"You are old\n"; // Just to show you it works...
}
else {
cout<<"You are really old\n"; // Executed if no other statement is
}
cin.get();
}
Eclipse underlines and says Quote: | Unresolved inclusion: <iostream>
| .
Now what?
EDIT: PS: It compiles and runs in Notepad++, where I use my own compile script.
[Updated on: Thu, 11 November 2010 10:32] Report message to a moderator
|
|
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.05203 seconds