C C++ Errors Question:
Download Questions PDF

When i use cout or cin call & then either << or >> .....it shows
declaration syntax error...what should i do?
cout<<"anything";
int a;
cin>>a;
return 0;?

Answer:

If you are using Turbo C complier need to add #include<iostream.h> header file.

and If you are using Visual Studio then you need to add

#include<iostream>
using std namespace;

the above two statements.

Download C C++ Errors Interview Questions And Answers PDF

Previous QuestionNext Question
Can you explain exceptions?char* f()
return "hello:";
void main()
{char *str=f();
}