How to use switch statement with char array !

switch(buffer)
{
case 0D:
cout<<"hi"<<endl;
break;
case 0C:
cout<<"Hey"<<endl;
break;
default:
cout<<"Bye"<<endl;

Assume buffer="0D", How to implement switch statement with char array?
Switch statements only work with integer types.

What are 0D and 0C supposed to be? Strings? Hex numbers?
Thanks for reply.
OD and OC are char array. I just want to compare the char array and depending on that need to perform some action.
Then you can't use a switch statement.
Okay Thank You
Topic archived. No new replies allowed.