tags:

views:

36

answers:

2

I'm new to c++. I'm using visual studio professional. I'm using Allegro library to make a game. When I access an Allegro type or an std; type, intelisense shows me the members. for instance if I do buffer-> it brings up a rectangle listbox of all the class members. But when they are my types it does not work.

I made a struct called PLAYER

struct PLAYER{
int age;
int health;
bool isdead;
};

so then I expected that if I did:

PLAYER *player;

player.

that I would see the members. I tried :: , . , and -> but none work. Where am I going wrong? If I do player.health = 100; it compiles but intellisense doesnt pick up on it.

Thanks

A: 

close and then reopen your VS, then try again.

EffoStaff Effo
A: 

Intellisence need to add your types in its database (file [YourSolution].ncb). Sometimes Intellisence can not add them so you need to:

  1. Close Visual Studio,
  2. Delete the .ncb file near to your solution file (.sln) cause your problem may be due to a corrupted file,
  3. Re-start Visual Studio. Intellisense will take some times to recreate all its database. Those time your type should be recognized.
Patrice Bernassola