Results 1 to 4 of 4

Thread: Enumerations?

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Aug 2000
    Posts
    1,091
    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

    Visual Studio 2010

  2. #2
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    Something similar to this:
    Code:
    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?
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Aug 2000
    Posts
    1,091
    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

    Visual Studio 2010

  4. #4
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    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 .
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width