How to call a Function from inside a Class

Edit: There is a more simple definition of my problem is in the 4th post of this topic.

Hi every body and thank you all for answering my earlier questions!
I read the tutorial to Polymorphism section and I wanted to make sure if I learnt it or N0T and I understood "or N0T" .
Here is the program I wanted to write:

The whole idea was: I wanted to design a program that asks the user what type of function is yours? (Constant, Linear, Quadratic and ...) and I declared 4 parameters, But I couldn't even do the constant one. (The compiler didn't compile anything) How can I call a function from inside of a class?
I tried changing the Constant function to Class type, like this:

12345

...
public:
Class Constant ()
{
...

And can I design the class how that gets the input of a function inside it?

@Moschops Thank you!
But how can I use a loop that connects functions to each other?
And about goto OK! They told me this before once, but I promise I won't use it again.

And the main thing: Well. This is not a great example. Can you give me a link that include examples good for class? THNX.
And you said the point of classes is that you can make many objects of the same type. That is what I didn't understand. I need to read the classes parts again, but can you explain me a bit more?well, with int I can make many objects of the same type too!!!!
Thank you again and sorry if I'm too Questionist.

Exactly. That's the point. You define a class when you decide that an int or a double or a float or a char or whatever isn't good enough and you need a new type. Then, once you've defined the class, you make as many of them as you like. Just like an int.

@Moschops Thank you again.
I got it all, expect one part: You said the way I can connect a function to another with aloop, but you also said I never ever call the main function. I think it's a paradox. Isn't it?

You can also use the break statement, to break out of a loop early, or the continue statement to restart the next iteration of the loop before the body of the loop code completes.

I would rather that beginners do something like this, rather than using infinite loops. There are situations when infinite loops are OK for advanced coders, but beginners should always try to supply an end condition for the loop.