|
-
Jan 11th, 2002, 12:15 PM
#1
Thread Starter
Frenzied Member
InteliSense enum?
hi,
How do I create an enum list of values to show up as a dropdown list in a function's parameter list?
-
Jan 11th, 2002, 02:36 PM
#2
Monday Morning Lunatic
No idea if this will trigger the IntelliSense or not (I use VC++5) but I'd expect it to:
Code:
enum days {
monday,
tuesday,
wednesday,
thursday,
friday,
saturday,
sunday
};
void myfunction(days d, int *i) {
*i = d;
}
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
-
Jan 11th, 2002, 07:40 PM
#3
It doesnt. Remember your values =P.
Z.
-
Jan 13th, 2002, 10:39 AM
#4
Monday Morning Lunatic
Which values?
You don't need to give them in C++ enums - they start from 0 and go up.
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
-
Jan 13th, 2002, 01:17 PM
#5
No, remember what values your enum can have =).
Z.
-
Jan 13th, 2002, 01:27 PM
#6
Monday Morning Lunatic
0 to 6 I would have expected...
...I don't totally understand what you mean.
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
-
Jan 13th, 2002, 04:17 PM
#7
Im saying "dont rely on intellisense". Keep the possible enum values in your head =). For example, using the days enum, just remember that the possible values are sunday, monday, tuesday, wednesday, thursday, friday, or saturday.
Z.
-
Jan 15th, 2002, 10:48 AM
#8
Monday Morning Lunatic
I do that anyway 
I've been doing that for the past 5 or 6 years, since the days of C, when I learnt on BBC
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|