VC++ Prob

Started by
7 comments, last by PsYcHoPrOg 24 years, 2 months ago
Those of you with VC++ as their compiler will know that whenever you create a successful pointer to an object of a structure/class with -> or use the period and directly access it, a little popup window comes up with all of the members of the class/struct. Well I am having a problem, after I type in the "->", nothing pops up. I''m assuming that this means that the pointer to the structure was not successful. Here''s the code: (I boldfaced the part where it doesn''t work)


int GameInit
{
	if(FAILED(DirectDrawCreate(NULL, &lpdd, NULL)))
	{
		//error
		return(0)
	}

	if(FAILED(lpdd->SetCooperativeLevel(//not important
Games are the path to another dimension.
D:
Advertisement
Only if you have v6. v5 and under doesn''t have the code complete feature. Unless I''m missing something.
William Reiach - Human Extrodinaire

Marlene and Me


if you have v6.0..
i know there are more reasons prolly but if the file that contains the prototype or actual function body or the datatype (like ddraw.h) is in the "External Dependencies" folder the popup containing it''s members/arguments won''t popup.
-werdup-
Well... this feature is great when it works, but sometimes it simply doesn''t... occasionally it will start working again after closing visual c++ and then loading it back up again. And sometimes, some things it refuses to do this feature no matter what you do.

Torval
really? when it doesn''t work for me it''s usually my previous post or i forgot to include it.
-werdup-
The autocomplete will fail to autocomplete if you forget important things like semicolons above where you are trying to get it to autocomplete...

if(FAILED(DirectDrawCreate(NULL, &lpdd, NULL)))
{
//error
return(0)
}
if(FAILED(lpdd->SetCooperativeLevel(//not important

Notice your missing semicolon after return(0)

It will also fail if you don't get the capitalization or other things right.

I also find that I have to include the ddraw header in my project (ie. add it to the project) to get the ddraw functions to autocomplete.



Mark Fassett
Laughing Dragon Entertainment
http:\\www.laughing-dragon.com

Edited by - LaughingD on 2/15/00 7:09:32 PM

Mark Fassett

Laughing Dragon Games

http://www.laughing-dragon.com

Thanks a lot. If syntax errors will cause autocomplete to fail, then you have solved my problem. Thanks for your help, everyone. Should you come across another reason autocomplete is failing, please post it up.;-)
D:
Sometimes the autocomplete doesn''t work even though the code is compilable. In such cases I usually need to rebuild the whole project so that the precompiled headers are renewed.

Other times it doesn''t work simply because VC++ cannot find the declarations, usually when working with libraries and such.
I found out the problem. I get this error which means that the struct LPDIRECTDRAW4 is not recognized although I did include ddraw.lib in my project as well as ddraw.h. Here is the error, the code is in the post "COMPILER ERROR". here is the error:

error C2501: ''LPDIRECTDRAW4'' : missing storage-class or type specifiers


D:

This topic is closed to new replies.

Advertisement