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

By: Alex

$
0
0

This is a tricky one. You’re declaring object dr with no parameters, but you’ve given it empty parenthesis. This will cause the compiler to think you’re declaring a function prototype for a function named dr that takes no parameters and returns a Derived.

You can fix this by removing the empty parenthesis when you declare dr.


Viewing all articles
Browse latest Browse all 159

Trending Articles