buddydavis
Programmer
Hey.... new to VC++...
I need to pass a string to a variable in the Switch statement but it keep giving me errors. Says somethign about conversion. here's what I'm trying to do :
switch (selected)
{
case "This is the launcher":
...
....
.....
break;
case "This is the steamer":
...
....
.....
break;
default :
...
....
.....
break;
}
I want to pass a String into the variable "selected" in the switch function. I just can't seem to get it right.
Thanks.
I need to pass a string to a variable in the Switch statement but it keep giving me errors. Says somethign about conversion. here's what I'm trying to do :
switch (selected)
{
case "This is the launcher":
...
....
.....
break;
case "This is the steamer":
...
....
.....
break;
default :
...
....
.....
break;
}
I want to pass a String into the variable "selected" in the switch function. I just can't seem to get it right.
Thanks.