开发者

Intellisense help VC++ 9

开发者 https://www.devze.com 2022-12-08 20:52 出处:网络
I\'m new to c++. I\'m using visual studio professional. I\'m using Allegro library to make a game. When I ac开发者_JAVA技巧cess an Allegro type or an std; type, intelisense shows me the members. for i

I'm new to c++. I'm using visual studio professional. I'm using Allegro library to make a game. When I ac开发者_JAVA技巧cess 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


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.


close and then reopen your VS, then try again.

0

精彩评论

暂无评论...
验证码 换一张
取 消