SyntaxFix
Write A Post
Hire A Developer
Questions
No, that's not how it is done. Normal way to initialize the base class is in the initialization list :
class A { public: A(int val) {} }; class B : public A { public: B( int v) : A( v ) { } }; void main() { B b(10); }