Hello! I have question: How to switch off highlight keyword "event" in Visual C++ 2010? I don't use .net , so for me it isn't keyword, and I would call it one variable "event".
+3
A:
Unfortunately there is no way to do this. This is hard coded to be a keyword in Visual Studio's C++ editor and cannot be changed. It's the equivalent of saying "Please stop highlighting class"
JaredPar
2010-08-30 16:32:15
+1 iff s/in C++/in Visual Studio/. `event` is not a C++ keyword.
Billy ONeal
2010-08-30 16:39:32
@Billy, updated it to be more clear that it's Visual Studio's C++ editor that considers it a keyword (not the C++ language)
JaredPar
2010-08-30 16:42:32
@JaredPar: +1 to you :)
Billy ONeal
2010-08-30 16:54:24
...nonetheless, you can tell other editors (eg: emacs, codewright, etc.) to quit highlighting any keyword you want with a little effort.
T.E.D.
2010-08-30 17:06:23
+1
A:
This is a side-effect of the C++/CLI language supported by the IDE. Where event is a keyword. There are others, like gcnew, generic, array, etc. Syntax highlighting is based on the file name extension and C++/CLI also uses .cpp.
I can't think of an easy fix. I'd recommend you post feedback to connect.microsoft.com
Hans Passant
2010-08-30 17:46:53