I have this class CTrainLine with a struct called ListNode and a ListNode pointer called head. On the contructor, I'm trying to use the new function with head to create a new ListNode, and I'm getting this error:
line 22: no matching function for call to `CTrainLine::ListNode::ListNode()'
I just did something exactly like this in another program and it works fine, and I can't see why it isn't now. Any insight would be greatly appreciated.
No it does not! I suppose that must be the problem. I could always add one, I suppose, but If possible I'd rather not do it JUST for this. Out of curiosity, is there any other way to get past this? Or do I just need to suck it up and add a default constructor?