Unit conversion with 3 functions

This is a discussion on Unit conversion with 3 functions within the C++ Programming forums, part of the General Programming Boards category; Hello I am a very new to C++. I am trying to convert a given number of meters and centimeters ...

Unit conversion with 3 functions

Hello I am a very new to C++. I am trying to convert a given number of meters and centimeters into feet and inches using three function. I think that I am close but since i am new I am having a hard time figuring out what i have done wrong. Thanks,

Errors:
1. You haven't called the unitconversion function.
2. A function can return only one value at time, you might pass the parameters as a reference.
3. don't cout<<unitoutput(lengthme, lengthcent);
just call unitoutput(lengthme, lengthcent);

Suggestions
1. You are converting the metres to feet and centimetres to inches which is not exactly helpful. You should reconsider the unitconversion function.
2. while (answer== 'y' || answer== 'y') both 'y's are in lowercase hence redundant.