Hello,
I have some problems with smart pointers. I want to have smart pointer,
copy_ptr in this case in my class like this:
class Entity
{
protected:
.....
copy_ptr<PropertyBagmProperties; // <- PropertyBag is a class here
.....
public:
Entity(const std::string &Id, const std::string &Type);
~Entity();
The problem is that the compiler returns an error:
Error 1 error C2512: 'copy_ptr<T>' : no appropriate default constructor
available. Should I use another declaration here ? If I try:
copy_ptr<PropertyBag*mProperties; then compiler doesn't throw any error
but I don't know if it fullfil its role because then I could write
PropertyBag *mProperties and don't have any smart pointer.
Thanks in advance.
Bartek