Why can’t you call invariants() as the first line of your constructor?


No Answer is Posted For this Question
Be the First to Post Answer

Post New Answer

More C++ General Interview Questions

explain the reference variable in c++?

0 Answers  


What do you mean by overhead in c++?

0 Answers  


Can user-defined object be declared as static data member of another class?

0 Answers  


Difference between Abstraction and encapsulation in C++?

0 Answers   Impetus,


Do you know about C++ 11 standard?

0 Answers   Agilent, ZS Associates,






Does there exist any way to make the command line arguments available to other functions without passing them as arguments to the function?

0 Answers  


Evaluate as true or false: !(1 &&0 || !1) a) True b) False c) Invalid statement

0 Answers  


How do I run c++?

0 Answers  


What is lazy initialization in c++?

0 Answers  


Why do we need constructors in c++?

0 Answers  


What is difference between array and vector in c++?

0 Answers  


In a class, there is a reference or pointer of an object of another class embedded, and the memory is either allocated or assigned to the new object created for this class. In the constructor, parameters are passed to initialize the data members and the embedded object reference to get inialized. What measures or design change should be advised for proper destruction and avioding memory leaks, getting pointers dangling for the embedded object memory allocation? Please suggest.

5 Answers   GE,


Categories