Archived

This topic is now archived and is closed to further replies.

burgc002

VC++ Compiler question....

Recommended Posts

I use DX to program the game (if you can call it that)stuff I do,anyway when I call a function, VC usually lists all the parameters for the function ya know how it does. Well even when I use a ddraw object it usually lists the member functions for me to choose from. Anyway it has stopped doing that I was wondering why? Its only with the DX stuff tho. If I havent totally confused you guys, try to help me out please, I would really appreciate it.

Share this post


Link to post
Share on other sites
I know exactly what you are talking about.
Try to write code in another file and I bet it will work fine at least for awhile.
But what is weird is that it isn''t just in certain files that it won''t autocomplete function calls for you. It is almost like certain functions aren''t allowed to have autocomplete, while code right above it can.
I cannot tell you why it does it that way, but if you were to start a new program, it should still work. As to why you can''t just keep using it in your old program, I wonder if google.com would have any answers.

Share this post


Link to post
Share on other sites
Auto completion exists when a file is linked to the file you are working on somehow. So if I include stdio.h, I will have auto completion using functions like printf(), scanf().... But I wont if I use functions from another file (because I have to include _that_ file also)

~Dwarf

Share this post


Link to post
Share on other sites
So when I include a .cpp file that holds info for my class into a file, why is it when I write one function from that class it autocompletes and when I write another function it doesn''t? I remember having checked and my code is correct and it worked, but it just seemed like VC++ just didn''t see that the function was declared there.

Share this post


Link to post
Share on other sites
Also I know I included ddraw.h in my program. But the DirectDrawCreateEx() wont autocomplete... I think that it is located in ddraw.h, I think anyway, I could be wrong. Trust me

Share this post


Link to post
Share on other sites
Usually it works for me when I moves all .H files under ''External Dependencies'' into ''Include files'' folder.

If not, try close the workspace, delete the .NCB and .CLW, reload, full-rebuilt.. and see it works or not.

Share this post


Link to post
Share on other sites
There''s also a replacement for VC''s broken autocomplete function called VisualAssist (www.wholetomato.com). This one works like it should and even offers a few other features like extended syntax coloring.

-Markus-

Share this post


Link to post
Share on other sites
If we are talking about VC6 then yes, it is a bug. I found (or the problem found me) a while back and after doing some searching/posting it was found that it is broken code. Sometimes I find if you are assertive and repeat your attempts to "trigger" the autocomplete it will work but this is about as reliable as the Gargoyle sitting on top of my monitor.

Had SP6 and it was on Windows ME. Going to see what happens on 2KPro and probably check out the alternative suggested by Cygon.

L8~

Share this post


Link to post
Share on other sites
I had the same problem when using VC6, but moved to VS.NET already and never had that problem ever since.

But I see something similar (in VS.NET) that can probably help. AutoComplete in VS.NET only works in a file that is part of an active project. So suppose I have a project called A, and there are two files opened: a.cpp and b.cpp. However, only a.cpp is part of project A. b.cpp is just a regular file opened from somewhere else not included in the project A. I notice that AutoComplete works only in a.cpp, not b.cpp.


My compiler generates one error message: "Doesn''t compile."
-Albert Tedja-

Share this post


Link to post
Share on other sites