Thanks
Type: Posts; User: Angelina
Thanks
Hello all,
Does anyone know why can I not put the call to the constructor of a base within the body of the derived class constructor? Here an example:
class A
{
int a;
public:
...
I'm not very familiar with the boost library and not keen on mixing that in now.
I was wondering if there is any more "standard" solution?
Yes, my objects are too big to be OK to copy
I think there is a missunderstanding here:
The problem is not that I am not passing the container as reference to functions, but that I do not want to copy on insertion and thus use containers of...
you can put it that way
I do not want to go to every function and change
my_vector_of_obgects[i]
to
*(my_vector_of_pointers_to_obgects[i])
But objects are copied on insertion into containers
Of course I meant vector<C*> it was a typing mistake, sorry.
Vectors of references do not exist. The reason is that a reference is just an alternative name for an object, so that makes no sense.
...
Hello,
I have writen a lot of functions working on containers of objects. Now I've decided it's better not to copy the objects in the containers, but to use conteiners of pointers.
Is there...