I have been building objects on the stack using the following constructor:
classname node(arg1, arg2);
Which worked fine.
But have now learned it is the heap I need to use.
So I need to use the new command I believe, but my syntax is wrong:
classname *ptr = new node(arg1, arg2);
But when I try this, it fails to compile.
Can you help?
Many thanks !