I don't see why you'd want to do it... It doesn't really make sense to me. Are you just trying to see if the guy enters something? Either way, this might work.
Code:
#include <iostream>
#include <string>
#include <vector>
int main( void ) {
std::string searchStr;
std::vector<std::string> inputOptions;
std::vector<std::string>::iterator::difference_type pos;
inputOptions.push_back( "one" );
inputOptions.push_back( "two" );
// etc
std::cout<< "What do you want to switch: ";
std::cin >> searchStr;
pos = std::find(inputOptions.begin(),inputOptions.end(),searchStr) - inputOptions.begin();
switch ( pos ) {
case 0:
std::cout<< "First position\n";
break;
case 1:
std::cout<< "Second position\n";
break;
default:
std::cout<< "Not found\n";
break;
}
return 0;
}