c++ switch string
switch(str2int("my string"))
{
case str2int("my string")):
{
}
break;
}
constexpr unsigned int str2int(const char* str, int h = 0)
{
return !str[h] ? 5381 : (str2int(str, h+1) * 33) ^ str[h];
}
c++ switch string
switch(str2int("my string"))
{
case str2int("my string")):
{
}
break;
}
constexpr unsigned int str2int(const char* str, int h = 0)
{
return !str[h] ? 5381 : (str2int(str, h+1) * 33) ^ str[h];
}
c++ switch case
switch(expr) {
case 1:
// do something
break;
case 2:
// do something
break;
default:
// do something
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us