Computing.Net > Forums > Programming > Syntax error

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Syntax error

Reply to Message Icon

Name: Rich
Date: August 3, 2003 at 02:36:50 Pacific
OS: 2000
CPU/Ram: PIII500
Comment:

Can someone please explain why this line is wrong and possibly how to fix it? Thanks

if((CheckBoard(int board[row][col]))==1){

I'm trying to call a function inside of an if statement.



Sponsored Link
Ads by Google

Response Number 1
Name: circuitfire
Date: August 3, 2003 at 05:14:36 Pacific
Reply:

CheckBoard() doesn't need "int" in the parenthesis.


0

Response Number 2
Name: igork
Date: August 3, 2003 at 05:28:33 Pacific
Reply:

put the "int" in parenthesis !

When U do a type casting u have to put the
"target type into parenthesis .

double d = 2.3;

int i;

i = (int)d; /* and NOT i = int d !!!*/


0

Response Number 3
Name: Rich
Date: August 3, 2003 at 17:03:48 Pacific
Reply:

Thanks for your help, got that one fixed.


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: Syntax error

MSDN Library - Invalid Syntax Error www.computing.net/answers/programming/msdn-library-invalid-syntax-error/12881.html

syntax error in QuickBasic or?????? www.computing.net/answers/programming/syntax-error-in-quickbasic-or/11224.html

awk syntax error www.computing.net/answers/programming/awk-syntax-error/19611.html