please help me. this is my first day learning about programming and im stuck on lesson 2 of the online tuturial on this website. i havent done any courses or read any books yet. but when i go to do the example programme and compile it comes up with this error: [Warning] In function `int main()':
`cout' undeclared (first use this function)
(Each undeclared identifier is reported only
`cin' undeclared (first use this function)
even when i copy and paste the programme.
the programme is this:
Code:include <iostream.h> 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 if(age<100) //If the age is less than 100 { cout<<"You are pretty young!"; //Just to show it works } else if(age==100) //I use else just to show an example { cout<<"You are old"; //Just to show you it works... } else { cout<<"You are really old"; //Executed if no other statement is executed } return 0; }
your assistance wil be muchly appreciated
thanks simon