MadhaviA
BAN USER
Comments (3)
Reputation 0
Page:
1
Comment hidden because of low score. Click to expand.
Comment hidden because of low score. Click to expand.
0
of 0 vote
If vector is needed to share among other class objects or outside your code block, reference option is gone.
use of objects in vector require copies created. This is more portable and simple but if objects are heavy in size or resouces, this option is gone too.
Pointers require dynamic allocation of your objects and deletion of them at some point where the usage is completed. This requires some programming discipline which is difficult to ask for. Smart pointers in the vector may give a solution to your need if usage of new is not threatening to your principles/standards.
Comment hidden because of low score. Click to expand.
Page:
1
CareerCup is the world's biggest and best source for software engineering interview preparation. See all our resources.
What are the default functions in an empty class?
- MadhaviA September 15, 2013Constuctor, Destructor, Copy constructor, Assignment operator, Assignment reference operator ) 5 members
does the size of empty class depend upon the compiler or hardware(32 bit or 64 bit)?
It shouldn't.