why dose it tell me 'cout' is undeclared
Code:cout<< "How many buggs will we have today? \n"; cin>> y; cout<<"We will have" << y <<"buggs today get ready"; while ( x = y )
why dose it tell me 'cout' is undeclared
Code:cout<< "How many buggs will we have today? \n"; cin>> y; cout<<"We will have" << y <<"buggs today get ready"; while ( x = y )
Did you include iostream.h?
#include <iostream.h>
`Who are YOU?' said the Caterpillar.
This was not an encouraging opening for a conversation. Alice replied, rather shyly, `I--I hardly know, sir, just at present-- at least I know who I WAS when I got up this morning, but I think I must have been changed several times since then.' - Lewis Caroll's Alice in Wonderland.
thanx i forgot that.
i guss that wasnt it this is the whole code...Its kind of a joke...
Code:#include <isostream.h> int main() { int y; int x = 0; int z = 0; int justin = 0; cout<< "How many buggs will we have today? \n"; cin>> y; cout<<"We will have" << y <<"buggs today get ready"; while ( x = y ) { cout<<"Error can't find disk /n"; cin.get(); cout<<"Ram undefined \n"; cin.get(); cout<<"harddrive has mailfunction shuting down \n"; while ( z = 10 ) { cout<<" \n"; z ++; }; cout<<"Rebooting... \n"; cout<<".... /n ... /n .... \n ..... \n ... \n"; cout<<"rebooted \n" <<"virus detected \n" <<"accesing \n" <<"opening \n" <<"starting \n"; while ( justin = 15 ) { cout<<"... \n" <<".... \n" <<"..... \n" <<"... \n"; justin ++; }; x ++; }; }
iostream.h is old and out of date
try this
Code:#include <iostream> using namespace std;
i used the changes and still
11 C:\Documents and Settings\Owner\My Documents\super fun game.cpp `cout' undeclared (first use this function)
(Each undeclared identifier is reported only once for each function it appears in.)
that is the exact error message..
Well, look at your code. Note what I have changed for you.
Originally Posted by firefly
Last edited by Antigloss; 06-20-2005 at 08:20 AM.
thanx for the help
While we're at it, you might want to check your slashes again.Code:cout<<".... /n ... /n .... \n ..... \n ... \n";
If I did your homework for you, then you might pass your class without learning how to write a program like this. Then you might graduate and get your degree without learning how to write a program like this. You might become a professional programmer without knowing how to write a program like this. Someday you might work on a project with me without knowing how to write a program like this. Then I would have to do you serious bodily harm. - Jack Klein
i noteced that on my own but thanx for the input..