Click to See Complete Forum and Search --> : Enumerations?
softwareguy74
Jan 6th, 2001, 04:31 PM
Hi,
I was wondering if you can create enumerations in VC++ as you can in VB?
I would like an intelisense list to drop down so that I can pick from a list of options.. Is that possible in VC++?
Any help or examples would be great!
Dan
parksie
Jan 6th, 2001, 05:20 PM
Something similar to this:
enum MyEnum {
val,
thing,
that
};
int func(MyEnum thingie) {
return thingie;
}
Although I don't have VC6 so I can't vouch for the Intellisense. Does it work with this?
softwareguy74
Jan 6th, 2001, 05:36 PM
Thanks! The intellisense does not seem to be available in VC++. I guess if you stop and think about it, it would be kinda hard to implement this feature in C++ because you can overload functions. Therefore, it wouldn't be able to know which function you are calling, unlike in VB.
Dan
parksie
Jan 6th, 2001, 05:38 PM
Oh. VC++ version 6 is supposed to have IntelliSense on functions and structures/classes.
Although even when you overload functions, there are still definite ways of differentiating between them. Except, of course, when they only differ by return type - and that's a C++ error :).
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.