• A member x of an object A is referred to with A.x just as done with structure elements in C.
• If you declare a class B, then the constructor function is also named B. B has no return type. If
this constructor takes, say, one argument of type integer, you define the constructor using the syntax:
B::B(int){whatever the function does};
• If you declare a member function C of class B, where return type of C is, say, float and C takes
two arguments, one of type float, and the other int, then you define C with the syntax: float
Do'stlaringiz bilan baham: |