As others have already stated in the comments your program leaks memory because you never delete your list on destruction. Destructors will not magically clean things up for you. If you want something done then you need to do it yourself.
I suggest taking another look at the basics. Perhaps this FAQ can help you. Also take a look at the official guidelines concerning resource managment. Generally the use of raw pointers is discouraged.Nodeis an implementation detail and as such should be part ofSingleLinkedListUse member initialization lists or direct initialization
You are violating the rule of 3/5/0
return 0can be dropped from the end of main as it's optionalYou are almost always using
nullptrbut then resort back to usingNULL, why?Your use of space after flow control statements is inconsistent and while not wrong it's really annoying to read
In your class the
privatekeyword is redundant as everything in a class is private by default. Generally you should order your interface from public to private so people can read the public part first.