help smart pointers

can anyone help me write this ptr.
disc is a another class with a has a relation ship with disclist.
uml
-disclistptr* :LinkedList<disc*>*
with the v little info provided my best attempt is:
1
2
3
4
#include <memory>
//...
std::unique_ptr<disclist> std::unique_ptr<LinkedList<std::unique_ptr<disc>>
//assuming std::unique_ptr throughout  

though it's not clear
(a) what the : is doing in the middle of your code
(b) what is uml
(c) whether your code is a variable or function declaration or something else entirely

finally disclistptr* is incorrect as the datatype is disclist, not disclistptr
uml is a type of diagram for a class. that outlines whats in the class. the format in which i wrote the line
-disclistptr* :LinkedList<disc*>*
is in the uml format that our professor gave us.
so disclistptr is the name of pointer. the "-" just means it is private. the semi-colon just seperates the name from what datatype
for example
+isEmpty(): boolean const
for future referance for anyone who may read this.
std::unique_ptr<LinkedList<std::shared_ptr<Disc>>> discListPtr;
this is how to write it.
Topic archived. No new replies allowed.