954,499 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

parse error

I'm very new to C++ and I keep getting a parse error for the bolded line below. I'm not understand why this is.

#include
using namespace std;
int main()
{ int a;
cout<<"\nPlease make me easier to read..."; a=2+2
cout<<"\nLook what I can do:2+2" <
cout<<"\nIcan do more, but only if you will help...";
cout<<"\n Thanks a lot\n";
return 0; }

charlize
Newbie Poster
1 post since Oct 2005
Reputation Points: 10
Solved Threads: 0
 

this is the c# forum. try the c++ forum

campkev
Posting Pro in Training
484 posts since Jul 2005
Reputation Points: 14
Solved Threads: 19
 

Your error is that you do not have a semicolon after 'a=2+2'

C++ ignores whitespace and all statements must end with a semicolon

crobicha
Newbie Poster
1 post since Dec 2009
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You