I forgot how to reference another function into a function in C++? In python it is declare as a class so that I can use it.
double footInches(double foot)
{
double inches = (1.0/12.00) * foot;
return inches;
}
double inchMeter(double inch)
{
double meter = 39.37 * (footInches(inch));
return meter;
}
I want to reference footInches in inchMeter.
edited
here is the main program
int main()
{
double feet, inch, meter, x = 0;
cout << "Enter distance in feet to convert it to meter: " << endl;
cin >> x;
cout << inchMeter(x);
return 0;
i think the last line is not correct. i want to get the x in footInches first, then go to inchMeter, and then return the answer from inchMeter.