C++ stl vector for classes with private copy constructor? -


there class in our code, class c. want create vector of objects of class c. however, both copy constructor , assignment operator purposely declared private. don't want (and perhaps not allowed) change that.

is there other clean way use/define vector<c> ?

you use vector<c*> or vector<shared_ptr<c>> instead.


Comments

Popular posts from this blog

Cursor error with postgresql, pgpool and php -

delphi - ESC/P programming! -

c++ - error: use of deleted function -