undeclared identifier


#include <iostream>
#include <iostring>
#include <iomanip>
using namespace std;

int main()
{
char reply;
int num1;
int num2;
int num3;
int num4;
cout<<"Welcome to Pat's Fare Calculator"<<endl;
cout<<"Are you driving a vehicle into the ferry?(y/n)"<<endl;
cin>>reply;
cout<<"Is the driver a senior citizen(over 65) or disabled?(y/n)"<<endl;
cin>>reply;
cout<<"How many passengers in your vehicle?(excluding the driver)"<<endl;
cin>>num1;
cout<<"Adults(age 19-64)"<<endl;
cin>>num2;
cout<<"Senior citizens(65 or older)"<<endl;
cin>>num3;
cout<<"Youth(5-18 years old)"<<endl;
cin<<num4;
cout<<"Is your vehicle longer than 7 feet, 6 inches in height?(y/n)"<<endl;
cin<<reply;

return 0;
}


1>------ Build started: Project: a03, Configuration: Debug Win32 ------
1> a03.cpp
1>a03.cpp(13): error C2065: 'cout' : undeclared identifier
1>a03.cpp(13): error C2065: 'you' : undeclared identifier
1>a03.cpp(13): error C2146: syntax error : missing ';' before identifier 'failed'
1>a03.cpp(13): error C2065: 'failed' : undeclared identifier
1>a03.cpp(14): error C2065: 'endl' : undeclared identifier
1>a03.cpp(14): error C2143: syntax error : missing ';' before '}'
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

any suggestions on how to fix these errors?thanks.!
1
2
3
cin<<num4;
cout<<"Is your vehicle longer than 7 feet, 6 inches in height?(y/n)"<<endl;
cin<<reply;
those 2 cins should have >> operator
your compiler probably don't recognize the iostream, use <iostream.h> instead...

hope that helps...
what sort of compiler are you using? try using <iostream.h> as he said. or try deleting it and rewrite it. and try checking your [char reply;] hope that help....
Topic archived. No new replies allowed.