C++ syntax Errors
Alvin
alvinbeach at gmail.com
Tue Mar 4 14:20:17 GMT 2008
Hello all,
The code in question:
if(n < 0 || n > slider->maximum()) // <-- This line
{
// report out-of-bounds error
}
The if-statement line is showing up as a syntax error (pink highlight) in
KDevelop despite that the code compiles and is ok.
The error I get in the Errors tab:
Column Problem
23 ')' expected found '->'
34 ';' expected found ')'
If I rearrange the inequality to be:
slider->maximum() < n
Then the error disappears.
BTW, 'slider' is a FLTK GUI widget.
I am using the following:
KDE 3.5.9 "release 51.2"
KDevelop 3.5.1
Thanks,
Alvin
More information about the KDevelop
mailing list