I'm trying to make a simple menu-driven application that calculates miles to kilometers and vice versa. It won't compile due to errors towards the bottom of the program. No matter what I do I can't fix them. What's up here? Thanks in advance!
char getMenuChoice(char choice);
This is a function prototype and not a function call.
You also don't return anything in the function definition, which is necessary when you have a return type.
char choice, Q;
Don't use global variables. Instead pass them as arguments to your functions.
for (double x = miles; double y = x / 2; y / 2; double z = x + y)
What are you trying to do here?
You don't need a loop to convert between units.
1 2 3 4
double milesToKilometers(double miles)
{
return miles * 1.609344;
}