can i have two enums with the same keywords but different values and titles ie
coopCode:enum value { TWO = 2, THREE, FOUR........ ACE}; enum score_value {TWO = 2 THREE = 3, FOUR = 5.... ACE = 41};
can i have two enums with the same keywords but different values and titles ie
coopCode:enum value { TWO = 2, THREE, FOUR........ ACE}; enum score_value {TWO = 2 THREE = 3, FOUR = 5.... ACE = 41};
Have you tried writing a test program?
Look up a C++ Reference and learn How To Ask Questions The Smart WayOriginally Posted by Bjarne Stroustrup (2000-10-14)
im banging my head against a wall trying to come up with an algorithm to score each possible poker hand uniquely The test i tried said i was redeclaring two etc etc i wondered if there was a way to do it.
In C, enum values are global. They're like fancy #define constants. If you don't want their names to conflict, you need to either give them different ones or add some sort of prefix that distinguishes them.
Devoted my life to programming...
Could score_value be implemented as a function where you enter enum value and get a integer returned?