VC2005 keywords

Started by
2 comments, last by pragma Fury 18 years, 10 months ago
Alright, so it works fine, except that it's colouring "event" blue, because this is a keyword under the .Net framework (I believe). Now, I'm not using the .Net frame work, and it compiles without any problems. But is there an option/file to modify so I can get rid of the blueness? I mean, it's kind of weird to set a blue word to equal something.
[ search: google ][ programming: msdn | boost | opengl ][ languages: nihongo ]
Advertisement
Quote:Original post by _goat
I mean, it's kind of weird to set a blue word to equal something.

*this = that;
Brilliant.

that != help with this problem though.

Oh ho ho.
[ search: google ][ programming: msdn | boost | opengl ][ languages: nihongo ]
I would think that the compiler would be smart enough to know it's compiling C++ code instead of .NET, and not complain about it. Are you sure you're not making a managed C++ .NET project?

Regardless, you can do what you want by redefining the blue word of choice, in my example, I want a variable called "int" of type float.
#define int VAR_intfloat int = 1.2;printf("%f", int);#undef int // make sure you undefine it.


Of course, you won't be able to create an int anywhere the #define statement is valid, but in the case of event, it shouldn't matter because it's not a C++ keyword anyway.

EDIT: "event" isn't really that descriptive of a variable name anyway. Typically, I would expect an event variable to be named something like "clickEvent" or "playerEvent" or something...

[Edited by - pragma Fury on May 28, 2005 11:38:35 AM]

This topic is closed to new replies.

Advertisement