Lost intelisence

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello all,
In a Managed C++ project I added a class, "CGenClass", and then included it's
header in the Form .h. I can create a instance of CGenClass by doing:
CGenClass* pC = new CGenClass();

but when I do:
pC->
I don't see any members, variables,etc. What happened to my Intelisense?

Any help appreciated....
TIA,

Ray k.
 
Ray,

Intelisense frequently seems to be as picky about syntax as the C++ language itself is. I actually take this as a good thing ... since if Intelisense quits working I go back and look for a mistake in the lines of code I added since the last time Intelisense worked.

Intelisense is also "scope sensitive". If you are trying to use a class or struct pointer variable outside of it's scope, the members will not appear.

Also, as a variation of the above, you sometimes will have to specify the name of the class containing the pointer variable. In your case, for example:

CForm::pC->

Ben
 
One thing as well about intellisense. I have found sometimes when
working with multiple projects in a single solution, my .ncb file can
get corrupt. If all else fails, close out of VS and go to the project
file you are working on. Delete the .ncb file. Then, restart VS and
open the project. This will generate a new .ncb file. 9 out of ten
times it fixes the problem for me. Of course you do need to make sure
you don't have any syntax mistakes first.

I got this out of the MSDN.
 
Back
Top