C++, constructor restrictions
- by Pie86
Hi everybaody,
I'm studing C++ and I can't understand the meaning of the boldface sentence below:
From IBM manual:
The following restrictions apply to constructors and destructors:
Constructors and destructors do not have return types nor can they return values.
References and pointers cannot be used on constructors and destructors because their addresses cannot be taken.
Constructors cannot be declared with the keyword virtual.
Constructors and destructors cannot be declared static, const, or volatile.
Unions cannot contain class objects that have constructors or destructors.
Could you please provide me an example?
Thank you!