I can't make it, the compiler doesn't like me. it says " This constant expression has type const char instead of the required int type"
My code
#include<string>
#include<iostream>
using namespace std;
void StupidSwitch(string str) {
switch (str)
{
case "whhy":
// DoSomethingElse();
break;
case "not":
// DoSomethingElse();
break:
case "working":
// DoSomethingElse();
break;
default:
// DoSomethingElse();
break;
}
}
I already tried to change the passing from void StupidSwitch(string str)
to void StupidSwitch(const char str)
but the compiler says the same thing again "
This constant expression has type const char instead of the required int type".