What are the restrictions apply to constructors and destructors?
Page 1 of 1
What are the restrictions apply to constructors and destructors?
The following restrictions apply to constructors and destructors
Constructors and destructors don't return values.
The addresses of constructors and destructors can't be taken so we can't use references and pointers on them.
Constructors cannot be declared with the keyword virtual.
Constructors and destructors cannot be declared static, const, or volatile.
Similar topics
» What is virtual constructors/destructors?
» What are destructors?
» When do you call copy constructors?
» In what situations do you have to use initialization list rather than assignment in constructors.
» Explain the order in which constructors are called when an object of a derived class is created.
» What are destructors?
» When do you call copy constructors?
» In what situations do you have to use initialization list rather than assignment in constructors.
» Explain the order in which constructors are called when an object of a derived class is created.
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|