I'm new to c++.
Here's the constructor I'm trying to understand:
I don't understand the part that's : r(initR)Code:RealNum::RealNum(float initR) : r(initR) {}
What does it mean?
r is a float that holds a real number.
If it was java code I would think r is a method name and initR is it's arguments.
Here's the class interface
Code:class RealNum { protected: float r; public: RealNum(float initR); float realPart(); virtual void square(); virtual void print(); };