class Example { public: void someMethod( double someDouble ); double someFunction( void ); Example(); // This is the constructor private: double someDouble; }; Example::Example(void) { cout << "Constructor was called" << endl; }
Example::Example( double someDoubleParam): someDouble(someDoubleParam) { cout << "Constructor was called" << endl; }
int x(5); // (int x = 5) Fraction fiveThirds(5, 3); // Fraction fiveThirds = Fraction(5,3)