If I created a vector with string values, how do I call one of those strings for when the user inputs an integer. Ex) a vector contains zero, one ,two...etc. when the user inputs 3, the output should be three.
int num;
string n;
cout << "Please enter a digit from 1 to 9:\n";
while (cin>>num)
for (int i=0; i < nums.size(); ++i) // see if the string is in numbers
if (nums[i]== n) num = i;
cout << "The spelled out value for " << num << " is " << nums[i];