Questions regarding constructors

class Number : public string
    Number() : string("0") { }
    Number(const string &str) : string(str) { }

However, as long as you have the following 2 lines in the beginning, the name Number will be replaced by preprocessor.

#ifndef Number
#define Number

You should use another macro name for the #include guard.

Browse More Popular Posts

Leave a Comment