Jin Jung Jin Jung - 5 months ago 38
C++ Question

c++ how to read this creating new constructor code?

LinkedListNode* toSort = new LinkedListNode((MTNode*)0, (LinkedListNode*)0,

can someone give me detail explanation on how to read this code??
especially, I don't understand those zeros in

(MTNode*)0, (LinkedListNode*)0,(LinkedListNode*)0


In a bit more modern c++, it would look like:

LinkedListNode* toSort = new LinkedListNode(nullptr, nullptr, nullptr);

Does it make more sense now? It just passes null values for each expected pointer.