The following code yields an error message:
after compilation i recieve an error message saying:Code:// temp1.cpp #include <iostream> using std::cout; void myM(char *); int main() { myM("june"); return 0; } void myM(char *month) { switch(month) { case 'june': cout << "\nJune"; } }
can anyone tell me how to change the code so it doesnt yield an error message ?error e2383 switch selection expression must be of integral type in function myM(char *)
Thanks !




Reply With Quote