adspace


What are the restrictions apply to constructors and destructors?

Answer Posted / Ram Prakash Pandey

Constructors cannot be declared static, virtual, or inline. They cannot return a value (except for the conversion constructor). Constructors cannot be overloaded on the basis of return type, but they can be overloaded based on parameters. Destructors must have the same name as the class and should not have any parameters or return a value.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What character terminates all character array strings a) b) . c) END

1393


How c functions prevents rework and therefore saves the programers time as wel as length of the code ?

1162


Can union be self referenced?

1265


daily Routine of father

1483


What is the latest version on c++?

1205