If you are getting "Crazy" numbers it is probably due to an undefined variable somewhere. Anyways what is up with this your default constructors. You just evaluate a variable and no nothing with it which is probably where the undefined is.
If you were a little more specific on which parts you are getting crazy numbers it would help. Why are you calling getx and gety inside the print function in your point class? Why not simply access the x and y variables.
I think that cylinder.r is never assigned a value. There are problems with the constructors, etc. as giblet says, but a quick fix may be to call cylinder.setRadius(r); at about line 42 in your main() function.
Yes. I didn't notice that. Call setPoints(double, double) on both circle and cylinder.
Or better yet! Write constructors for circleType and cylinderType which take all the relevant parameters for the object. ie x,y,r for a circle and x,y,r,h for a cylinder. Collect the values from the user then use them when constructing (declaring) the object. This would be cleaner.
OK. Suppose you add a constructor to the pointType class taking 2 doubles. pointType::pointType(double X, double Y): x(), y(Y) {}// intializer list method
Or pointType::pointType(double X, double Y): {x=X; y=Y;}
With this ctor (constructor) you can do this in main:
You have to create the prototype not just copy his definition. Look at my example is has the prototypes and definitions. Then you can use that to modify yours like fun2code mentioned.
By the way why did you remove about half of the original post?