Why this don't work for string?Code:string x = "test1";
switch(x){
case "test1" : break;
case "test2" : break;
default : break;
}
Printable View
Why this don't work for string?Code:string x = "test1";
switch(x){
case "test1" : break;
case "test2" : break;
default : break;
}
you cant use switch with string, however you could write your own switch if you really wanted to
from google: http://www.codeguru.com/Cpp/Cpp/cpp_...icle.php/c4067