By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,996 Members | 896 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,996 IT Pros & Developers. It's quick & easy.

Error C2061: syntax error

shashahayes
P: 13
I am getting an error on this line, does anyone have any suggestions?

here is the error
here is line 25

Expand|Select|Wrap|Line Numbers
  1.   if area > 750 then charge = 200
  2.  
1>Furniture.cpp
1>c:\users\jimsha\documents\visual studio 2008\projects\furniture\furniture\furniture.cpp(25 ) : error C2061: syntax error : identifier 'area'
1>Build log was saved at "file://c:\Users\JimSha\Documents\Visual Studio 2008\Projects\Furniture\Furniture\Debug\BuildLog.h tm"
1>Furniture - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Mar 6 '10 #1

✓ answered by Banfa

That is nothing like C/C++ syntax. C/C++ has no then keyword and uses parenthesis () round the conditional expression.

Look up if in your text book or read this

Share this Question
Share on Google+
2 Replies


Banfa
Expert Mod 5K+
P: 8,916
That is nothing like C/C++ syntax. C/C++ has no then keyword and uses parenthesis () round the conditional expression.

Look up if in your text book or read this
Mar 6 '10 #2

shashahayes
P: 13
Thank You For your help !
Mar 7 '10 #3

Post your reply

Sign in to post your reply or Sign up for a free account.