Jump to content
  • Advertisement
Sign in to follow this  
_goat

VC2005 keywords

This topic is 4868 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
Advertisement
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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!