mercredi 2 janvier 2019

Delegating constructors - use () ot {}?

I have a constructor that delegates to another constructor. The only question is that can I use {} instead of () when I call the Base constructor? Derived class is sub-class of the Base class.

Derived::Derived(double amount, int _int_rate): Base(amount), int_rate{_int_rate}{}

Aucun commentaire:

Enregistrer un commentaire