lundi 30 juillet 2018

How to construct a tree structure with smart pointer?

Here is a code snippet which i want to get a tree structure with smart pointer.But i got c3646('parent': unknown override specifier) and c4430(missing type specifier - int assumed) in vs.Does anybody know what's going on and how do i fix it>?

#include<memory>

class Obj {
    ObjPtr parent;
};
typedef std::shared_ptr<Obj> ObjPtr;

Aucun commentaire:

Enregistrer un commentaire