Can you call a destructor C++?

No. You never need to explicitly call a destructor (except with placement new ) . A class’s destructor (whether or not you explicitly define one) automagically invokes the destructors for member objects. They are destroyed in the reverse order they appear within the declaration for the class.

Read more

What is the syntax of constructor in C++?

C++ allows us to use the three constructor functions we have discussed in the same class. For example: class complex { int a, b; public: complex() // default constructor { a= 10; b=45; }; complex( int x, int y) // parameterized constructor { a=x; b=y; }; complex( complex & v) // copy constructor { a=v.a; b=v.b; }; };

Read more