Some (pseudo)code:

- Code: Select all
`const conversion_factor_I_can't_figure_out`

//now this is what *I* want to do, just generic code, not what I'm really gonna do ;)

int totalInches = 75; //(6 foot 3 inches)

int feet = totalInches / 12; //drops the decimal of .25 and feet comes to 6

int inches = totalInches % 12; //modular, drops the remainder of 3 into inches

Maybe I'm going about this all wrong, but to me, what I typed in would be correct and maybe the author just wants something simple like:

- Code: Select all
`const int ONEFOOT = 12;`

I'm thinking that a const cannot be a function or a formula. That would better be handled by a #define but then again I haven't been familiar with C++ for quite a while.

I think what I'm doing is right, but if someone wants to correct me, feel free, it's what I'm looking for

I can post the question too if need be.