You have function prototypes that overload an area function but you call and define later a volume function. Two of the prototypes are identical, but it seems one of the overloads should take three parameters?
Function prototypes can be pulled out of the main function and put before it. Main should also return int, not void (you may be using an older compiler?).
Do you know that proper indentation and a little vertical and horizontal white space would make you program much easier to read. With proper indentation and adequate white space you may have been able to see some of the problems with your code. Another thing that would probably help would be to use meaningful variable names, and avoid single letter names, especially l,o,I,Q,O.
And you really should move your function prototypes outside of main(), a main() that should be defined to return an int, not a void.
jlb, actually, it's taught in our school like that. we have always done c++ with void main(). doesn't make much difference, does it? int needs return, void needs nothing.
Actually it does. void main() is not valid in either or C++. Your school is teaching you how to use incorrect code. It may happen to be supported by your particular complier, but if you were to use a different compiler, chances are it would simply fail to compile.
jlb, actually, it's taught in our school like that. we have always done c++ with void main(). doesn't make much difference, does it?
It's the difference between a conforming program and one that isn't. One should strive to avoid the undefined behavior one can encounter in non-conforming code.
int needs return, void needs nothing.
In C++, not explicitly returning from main is the same as returning 0 (provided the return type is int of course,) so that point is entirely moot.