If your using Dev c++ as compiler for c++ program but you getting following error.
`cin' undeclared (first use this function)
`cout' undeclared (first use this function)
Than use following statement after header files.
using namespace std;
see following example to get idea
#include
int main()
{
int num;
cin>> num;
cout << num;
return 0;
}
modify this program by adding using namespace std; statement.
#include
using namespace std;
int main()
{
int num;
cin>> num;
cout << num;
return 0;
}
Leave reply
Add your comments here