LinkedList of int nodes in C++
Two things:


You need to use a lot of consts.


Example:

    void setNext(ListNode &amp;node)

    void setNext(const ListNode &amp;node)



You call to new in some places of your code but never call to delete