Yes, there are many ways: the if/else or the switch statement, these two are for a small number of values.
But if you have a big number of values use an array or std::vector to store values and a function to search.
| CodeGuru Home | VC++ / MFC / C++ | .NET / C# | Visual Basic | VB Forums | Developer.com |
|
Results 1 to 15 of 17
Threaded View
|
Click Here to Expand Forum to Full Width |