What are the restrictions apply to constructors and destructors?
Answer / 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 |
What is the purpose of ios::basefield in the following statement?
Do you know the problem with overriding functions?
int age=35; if(age>80) {Console.WriteLine("Boy you are old");} else {Console.WrieLine("That is a good age");}
Explain how overloading takes place in c++?
string somestring ; Which of the following choices will convert a standard C++ string object "somestring" to a C string? a) Copy.somestring () ; b) somestring.c_str () c) &somestring [1] d) std::cstring (somestring) e) (char *) somestring
The "virtual" specifier in a member function enables which one of the following? a) Monmorphism b) Late binding c) Metamorphism d) Solomorphism e) Inheritance
What is vector pair in c++?
What problem does the namespace feature solve?
We use library functions in the program, in what form they are provided to the program?
Is c++ a dying language?
Who discovered c++?
What is std namespace in c++?