Sign in to follow this  
_goat

VC2005 keywords

Recommended Posts

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.

Share this post


Link to post
Share on other sites
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_int
float 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]

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this