0

Hi

Im having a problem with the following piece of code:

#include <iostream>
using namespace std;
#define something 33;

void main() {
    if (33 == something) {
        cout << "equals" << endl;
    }
}

Im using Visual C++ 2008 (not Express) and I get 2 errors and 1 warning when compiling:

line 6: error C2143: syntax error : missing ')' before ';'
line 6: error C2059: syntax error : ')'
line 6: warning C4390: ';' : empty controlled statement found; is this the intent?

I think this is really odd. Any Help?

Edited by mike_2000_17: Fixed formatting

2
Contributors
2
Replies
3
Views
9 Years
Discussion Span
Last Post by Salem
0

Not forgetting the whole "void main" thing.
And the somewhat dubious rearrangement of the constants in the equality.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.