switch (currencyinputd)
the variable being switched off of should be an integer. it only works off ONE value. If you need to switch off 3 values, you need 3 switches or some other idea. you can use an if statement in a switch, or you can use the same switch in a function and send it multiple variables.
you can also 'combine' multiple values into one integer. That depends on the data and can get advanced in a hurry, lets skip it for now.
here is my take on it:
switches can be powerful due to their fall-through capability and the fact that the compiler tends to implement them as lookups instead of branches. So they can be very efficient and elegant for specific problems. If you are not getting either performance or elegance from the switch, it may be better to simply use if/else statements.
all that said, here is a tutorial:
https://www.cplusplus.com/doc/tutorial/control/ (find the section on switches)
or, I will give you this:
a switch is checking the state of a single variable.
that variable will be in one of a few states that you define (eg a character that is either 'a', 'm', or 'x') or a state you did not define (provide a default behavior).
that is it. When it is in one of the above states (defined or default), you do specific things (your code block).
it is exactly like an if statement,
if (input == 'm')
{
do your special m stuff
}
else if (input == 'x')
{
do your special x stuff
}
...
else
{
do your default stuff.
}
again, the difference is the fall-through.
in a switch:
case 'm':
cout << "m";
case 'x':
cout << "X";
break;
...
this will print what? it prints M, then X, if you enter M, but only X if you entered X.
that is harder to express in if/else. Not unpossible, just not as simple:
if(input == 'm')
{
cout << "m"; //this represents repeating code, though. you would need
//a block of the same code in the M condition and the same block in the X condition
//for a more complex example, and repeating code is 'bad'.
cout << "x";
}
else (if input == 'x')
cout << "x";