Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Unresolved inclusion: <iostream>
Unresolved inclusion: <iostream> [message #638389] Thu, 11 November 2010 07:40 Go to previous message
No real name is currently offline No real nameFriend
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
#include <iostream>
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

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic:graph data on Eclipse console window to our computer
Next Topic:Importing part of huge code base into eclipse/oxygen
Goto Forum:
  


Current Time: Thu Apr 25 00:32:44 GMT 2024

Powered by FUDForum. Page generated in 0.03111 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top