Quantcast
Channel: Comments on: 11.4 — Constructors and initialization of derived classes
Viewing all articles
Browse latest Browse all 159

By: floatingDivs

$
0
0

The base class constructor Base(int) will be used to initialize m_nValue to 5, and the derived class constructor will be used to initialize m_dValue to 1.3!

Wouldn’t it be that the base class constructor would be used to initialize m_nValue to 1.3 and derived class constructor would be used to initialize m_dValue to 5 (which wouldn’t work since the base class constructor requires an integer)?


Viewing all articles
Browse latest Browse all 159

Latest Images

Trending Articles



Latest Images