Error C2061: syntax error

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • shashahayes
    New Member
    • Mar 2010
    • 13

    Error C2061: syntax error

    I am getting an error on this line, does anyone have any suggestions?

    here is the error
    here is line 25

    Code:
      if area > 750 then charge = 200
    1>Furniture.cp p
    1>c:\users\jims ha\documents\vi sual studio 2008\projects\f urniture\furnit ure\furniture.c pp(25) : error C2061: syntax error : identifier 'area'
    1>Build log was saved at "file://c:\Users\JimSha \Documents\Visu al Studio 2008\Projects\F urniture\Furnit ure\Debug\Build Log.htm"
    1>Furniture - 1 error(s), 0 warning(s)
    ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
    Last edited by shashahayes; Mar 6 '10, 07:25 PM. Reason: missing info
  • Banfa
    Recognized Expert Expert
    • Feb 2006
    • 9067

    #2
    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

    Comment

    • shashahayes
      New Member
      • Mar 2010
      • 13

      #3
      Thank You For your help !

      Comment

      Working...