Click here to Skip to main content
15,920,596 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I'm am hummin' along in my c++ project that has a myfile.cpp and a myfile.h which contains the definition of the main class myclass.

Out of the blue sky (right) a good number of functions in the class that have always been navigable via the drop down in myfile.cpp have appeared to have gone out of scope and are grayed out in the drop down menu.

Clicking on the grayed function(s) jump me to their definition in Myfile.h rather than their implementation in Myfile.cpp.

Everything looks ok and the project compiles and runs as expected but I have lost navigation to the functions implementation via the drop down menu and have had to resort to searching.

Too many functions and or variables? There is a truckload of them.

Thanks for helping.

:Ron
Posted
Updated 26-Jul-13 3:27am
v2

There are a few things that can confound Intellisense (which is responsible for color-coding your code):

1. You may be using a #ifdef statement somewhere (possible hidden in some header) that effectively excludes the parts of the code that you are looking at.

2. If you have multiple copies of your project in different directories, searching stuff via the find dialog within your "solution" may accidentally search in the wrong directory; If in that directory, the code looks different, this may lead to apparently incorrect views. Hover over the tab header of your editor window to get a tooltip showing the actual location of that file.

There may be other reasons, but it's hard to tell without seeing the actual project.
 
Share this answer
 
Comments
nv3 26-Jul-13 4:29am    
My 5, Stefan. Intellisense is indeed sometimes a mystery.
Well, I fixed it.

There were 5 static thread start functions in the Myfile.h that were defined in the class.
I moved them out of the class and all the functions within the class are now not grayed in the ide drop down and we're back in business!

I arrived at the solution by examining a diff between and old .h file and the current one.
The only difference was 3 more of these static thread start functions in the latest file.

Thanks for all your help

:Ron
 
Share this answer
 
check your defines and targets. Maybe you compile for Windows XP or ".net compact"

If you have written which functions are grayed the answer WOULD be better :-O
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900