what do u mean by parse error

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • cool17
    New Member
    • Oct 2006
    • 24

    what do u mean by parse error

    void resultop(int result, int expValue)

    {

    string temp;
    if(result==2)pa rse error
    {
    temp="Unknown";
    }
    else
    {
    if (result == expValue);
    {
    temp = "Passed";
    }
    else --- this is where the parse error is
    {
    temp = "Fail";
    }

    }

    can someone help me ?
  • Banfa
    Recognized Expert Expert
    • Feb 2006
    • 9067

    #2
    It means you put a semi-colon on the end of your if

    Code:
     if (result == expValue)[b];[/b]
    ending the if statement and making the else invalid at that point.

    Comment

    • cool17
      New Member
      • Oct 2006
      • 24

      #3
      thank you once again

      Comment

      Working...