Seems like your teacher is a bit frustrated and out of shape if apart from that comment he did not give you any clues. Raw pointers are OK, as long as the ownership is clearly defined. To make it easier, just use
unique_ptr
and
shared_ptr
(but careful with that if you have cyclic dependencies). Anyway, there are many other things that might be improved in the code, go for codereview as suggested. —
pptaszni 26 secs ago