VC++ 6 IntelliSense with local structures
I think the topic explains it all, but I''ll explain it better. Why does the IntelliSense function in VC++ 6 not work with local structures, but with global ones? Or is there something wrong with my VC++ version?
============================
Daniel Netz, Sentinel Design
"I'm not stupid, I'm from Sweden" - Unknown
============================Daniel Netz, Sentinel Design"I'm not stupid, I'm from Sweden" - Unknown
Your structure might be out of recognizable scope. Did you try using Ctrl-Alt-T to bring up the auto-complete?
Nope, but it looked like something like this:
(I think this is right)
void main(void)
{
struct Dog
{
int Name;
int Age;
}
Dog Beagle;
}
============================
Daniel Netz, Sentinel Design
"I'm not stupid, I'm from Sweden" - Unknown
(I think this is right)
void main(void)
{
struct Dog
{
int Name;
int Age;
}
Dog Beagle;
}
============================
Daniel Netz, Sentinel Design
"I'm not stupid, I'm from Sweden" - Unknown
============================Daniel Netz, Sentinel Design"I'm not stupid, I'm from Sweden" - Unknown
Beagle.Name
When I put the structure declaration outside the main function, it worked just fine. Do we smell MS style..?
============================
Daniel Netz, Sentinel Design
"I'm not stupid, I'm from Sweden" - Unknown
Edited by - Spiff on 3/24/00 6:15:09 AM
When I put the structure declaration outside the main function, it worked just fine. Do we smell MS style..?
============================
Daniel Netz, Sentinel Design
"I'm not stupid, I'm from Sweden" - Unknown
Edited by - Spiff on 3/24/00 6:15:09 AM
============================Daniel Netz, Sentinel Design"I'm not stupid, I'm from Sweden" - Unknown
I didn't know you could do local structures, and I don't know why I'd use them either... Why not make Dog into a class? Classes are essentially functions with common local structs (and a bit more, too).
There are a few problems with "IntelliSense." With my embedded template classes, it doesn't display any of the function names. Oh, one tip I picked up -- if you want to call a function of a class from within a class but can't remember the name, do this-> and start typing the first few letters. IntelliSense is neat when it works!
Good Luck!
- null_pointer
Edited by - null_pointer on 3/24/00 7:45:15 AM
There are a few problems with "IntelliSense." With my embedded template classes, it doesn't display any of the function names. Oh, one tip I picked up -- if you want to call a function of a class from within a class but can't remember the name, do this-> and start typing the first few letters. IntelliSense is neat when it works!
Good Luck!
- null_pointer
Edited by - null_pointer on 3/24/00 7:45:15 AM
I do know that the use of local structures are limited to the specified function, but still..that is no good reason why it shouldn''t work.
The reason I don''t do classes is
a) structures has its advantages too + it''s good to know
b) I haven''t come to that part of my "Learning C++" book yet
============================
Daniel Netz, Sentinel Design
"I'm not stupid, I'm from Sweden" - Unknown
The reason I don''t do classes is
a) structures has its advantages too + it''s good to know
b) I haven''t come to that part of my "Learning C++" book yet
============================
Daniel Netz, Sentinel Design
"I'm not stupid, I'm from Sweden" - Unknown
============================Daniel Netz, Sentinel Design"I'm not stupid, I'm from Sweden" - Unknown
For those who don''t know. In C++, a class is a struct. The only difference is the default visiablity. Classes default to protected, structs to public.
"That which the flame does not consume...consumes the flame. "
"That which the flame does not consume...consumes the flame. "
"That which the flame does not consume...consumes the flame. "
don''t you mean that classes default to private, not protected?
-mordell
__________________________________________
Yeah, sure... we are laughing WITH you ...
Yeah, sure... we are laughing WITH you ...
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement