How would you represent an error detected during constructor
of an object?
Answer / arash
errors in constructors are represented by exceptions
| Is This Answer Correct ? | 1 Yes | 0 No |
class Foo { public: Foo(int i) { } }; class Bar : virtual Foo { public: Bar() { } }; Bar b; Referring to the above code, when the object 'b' is defined, a compiler error will occur. What action fixes the compiler error? a) Adding a virtual destructor to the class Bar b) Adding a constructor to Bar which takes an int parameter c) Adding "Foo()" to the Bar constructor d) Adding a copy constructor to the class Foo e) Adding "Foo(0)" to the Bar::Bar initializer list
What does count ++ do in c++?
Explain the concept of inheritance in C++.
What is the use of the this pointer?
What is the difference between global variables and static varables?
What is the error in the code below and how should it be corrected?
What is an explicit constructor?
Reads in the size of a square from the screen; 2. Prints a hollow square of that size out of “-“, “|” and blanks on screen; 3. Prints the same hollow square onto a text file. Your program should work for squares of all side sizes between 1 and 20. --- │ │ │ │ │ │ ---
What is a virtual destructor?
List out function which we can call without using object
CAN U SAY WHICH PROGRAMING LANGUAGE IS USED BY DOCTORS....?
What is abstract keyword in c++?