Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 No statement completion...?
Index -> Programming, C++ -> C++ Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message

PostPosted: Fri May 28, 2004 3:47 pm   Post subject: No statement completion...?

Ok, this has really been getting on my nerves.. i've been doing my project using MFC classes and things have been going ok so far, but starting a few days ago my compiler no longer does statement completion on whatever i type (I am using Microsoft Visual C++... ) for example, if i type an object of a class, and i type a '.' after it, it does not show the methods and variables available for that class... although the program still compiles normally. The problem might seem minor, but this has been making me really nervous- because i have a feeling it means there is a mistake somewhere in the code that is significant but still allows the code to be compilable. and, yesterday, after i made some changes the program would crash the moment i ran it (no compiler/linking errors, just 'Fatal exeption' at runtime) so i wonder if that had anything to do with it.
This doesn't happen with all projects on my compiler- only this one. But, it does happen for ALL classes/structures on this project.
If it matters, one of my classes has over 90 variables. (could that have caused it? i didn't think it would, but...)
If someone knows why i might be experiencing this...?

PostPosted: Sun May 30, 2004 9:24 am   Post subject: (No subject)

try this: On the Tools menu, click Options.
In the Options dialog box, click the Editor tab.
In the Statement Completion group box, make sure the appropriate IntelliSense options are selected.

PostPosted: Fri Jun 04, 2004 6:22 pm   Post subject: (No subject)

after checking over my code, that was the first thing i tried =( no luck.. i've been having a whole slew of other problems with the project (can't declare variables for a control, can't MessageBox at times, can't properly make a new Dialog resource, problems recognizing includes even when they're in the right order) so... yeah. it's sad, 'cause i'm not in a position right now where i can just start over..
if anyone knows why this might be happening..
(wow, i miss Turing..)

PostPosted: Fri Jun 04, 2004 6:31 pm   Post subject: (No subject)

Could it possibly be that you were trying to do something outside of a function? I know that I... er, um, AsianSensation once had a problem like that.

PS: it's not really C++'s fault, blame MFC. And ask somebody for the MFC wallpaper, it may help.

PostPosted: Sun Jun 06, 2004 3:05 pm   Post subject: (No subject)

hmm.. i don't think that was it.. In the header file for my dialog window i declared a bunch of variables of class CMaskedBitmap (wrapper function to use images).. and that was fine, except for some of these variables i can use statement completion and for some i can't. and they're declared right next to one another.. Like, here:
(this is in the header file for the Dialog)
        CMaskedBitmap m_ti12;
        CMaskedBitmap m_ti13;
        CMaskedBitmap m_ti14;
        CMaskedBitmap m_cursorimage;

And then, in the .cpp file for the dialog:


There is statement completion for the first three but not the fourth. i don't think there were any typos.. (since the declaring variables was just copy&paste anyway). and what's more, when i typed out the function names anyway, it compiled and linked with no errors-- but crashed at runtime. so i closed the project and opened it again, deleted the variables, and after getting a little further in the project i declared them again and now they work although there's still no statement completion.

i guess it is MFC then. i saw your wallpaper ^^ it's the one with the Black Mage on it, right? it's very, very true...

PostPosted: Mon Jun 07, 2004 1:50 pm   Post subject: (No subject)

OK this sucks, the same thing is now happening to me. But only for some!! With all of my objects, it works fine, but if I have a vector, it won't work. Hmm...

PostPosted: Mon Jun 07, 2004 3:11 pm   Post subject: (No subject)

using MFC in the first place is suicidal... thats why i've done my FP in C# (.net IDE)

PostPosted: Mon Jun 07, 2004 3:18 pm   Post subject: (No subject)

I'm not doing mine in MFC (could you imagine?), but I'm still having the problem. It's just for the vectors though. Everything compiles correctly, but the dropdown doesn't show up.
EDIT: That's the std::vector, by the way, not an (x, y, z).

PostPosted: Tue Jun 08, 2004 9:36 am   Post subject: (No subject)

I've noticed that it only gives me this problem when I declare the variable as a std::vector<whatever>. If I tell it to use the standard namespace and then declare it as vector<whatever> I don't have the problem. Confused

PostPosted: Wed Jun 09, 2004 7:48 pm   Post subject: (No subject)

OK, I figured it out. In one of the source files for a font API I downloaded, the stupid idiot who programmed it had "using namespace std;" globally. That way, std::vector didn't seem to agree with it... it also explained why my executable was over half a meg.
Display posts from previous:   
   Index -> Programming, C++ -> C++ Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 10 Posts ]
Jump to: