0

I'm working with existing code, where I've found that I have to modify some #include preprocessor directives. For example, to change

#include "myhdr.h"

to

#include "..\hfiles\myhdr.h"

I include the original line in a comment just above the changed line:

/*
#include "myhdr.h" original */
#include "..\hfiles\myhdr.h"

When I do this, some subsequent preprocessor lines appear grayed-out. It doesn't always occur, and it's not consistent. I've tried to find what this means by searching the MS help, which triggered an error in their search engine. Can some kind soul please provide a clue as to what it means, and what might be going on?
Thanks --bg.

3
Contributors
2
Replies
3
Views
8 Years
Discussion Span
Last Post by ArkM
0

It's just a quirk of the text highlighting. I've found that when I'm mucking about with preprocessor directives, the highlighter can't always keep up with me and even though the code is correct, the highlighting is wrong.

0

Visual C++ editor shows text blocks deselected by conditional compilation directives as grayed (it's a stable state until you don't tread on #if-#else structure).
Check #if-#endif balance and conditions in the new header version...

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.