Results 1 to 1 of 1
Hi all..
i couldn compile a simple cpp program.
here is de code and de error..can anyone clarify this..
code:
//filename a.cpp
#include<iostream>
int main (int argc, char* argv[])
{
...
- 12-11-2008 #1Just Joined!
- Join Date
- Dec 2008
- Posts
- 1
Compilation problem
Hi all..
i couldn compile a simple cpp program.
here is de code and de error..can anyone clarify this..
code:
//filename a.cpp
#include<iostream>
int main (int argc, char* argv[])
{
int i;
cout << "Enter value for i:";
cin >> i;
if(i==0)
{
cout << "/nZeroooo" ;
exit(0);
}
cout << "iiii:" << i ;
return(0);
}
Error:
a.cpp: In function ‘int main(int, char**)’:
a.cpp:6: error: ‘cout’ was not declared in this scope
a.cpp:7: error: ‘cin’ was not declared in this scope
a.cpp:11: error: ‘exit’ was not declared in this scope


Reply With Quote
