error C2143

i've wrote a simple program:

#include <iostream.h>
int main()
{
float a;
cout<<"a=";
cin>>a "\n";
return 0;
}

But when I press ctrl+f5 to run it, visual c++ 6 gives me an error:
error C2143: syntax error : missing ';' before 'string'
What does it mean?
cin>>a "\n"; Makes no sense
change it to cin>>a;
for cin>>a "\n"; you don't need the "\n" in it.
cin >> a;

What are you trying to do with the program?
Last edited on
Topic archived. No new replies allowed.