Hello
Once the program is compiled, variables doesn't have names..
What you can do is a switch statement like this
switch( strtokIndx[0] )
{
case 's' :
{
color = s;
break;
}
default :
{
color = f;
break;
}
}
Or eventually use strcmp if you want to be able to use more than one letter:
if ( !strcmp( strtokIndx, "green" ) )
{
color = s;
}