class MyClass
{
int a;
}
MyClass v1;
v1.a = v1.a - 3;
I'm getting 'Expected identifier at column 3' for 'v1.a = ...' statement. Am I doing something wrong? (I'm on trunk)
🎉 Celebrating 25 Years of GameDev.net! 🎉
Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!
class/bug?
Hello!
AS code:
Your code needs to be in a function. Column 3 is the point at which the compiler realizes something is wrong.
Exactly.
The global statements can only be used to declare global variables. You cannot perform general expression statements, as global statements.
The global statements can only be used to declare global variables. You cannot perform general expression statements, as global statements.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement