how can i use strings inside switch block in c/c++,
what macro i must create to make folowing code work?
Code:#define CMD_1 "cmd 1" #define CMD_2 "cmd 2" Function( char* command ) { switch(command){ case CMD_1: ... break; case CMD_2: ... break; } }
| CodeGuru Home | VC++ / MFC / C++ | .NET / C# | Visual Basic | VB Forums | Developer.com |
|
Results 1 to 15 of 16
Threaded View
|
Click Here to Expand Forum to Full Width |