Creating a copy constructor for a linked list

前端 未结 5 1666
Happy的楠姐
Happy的楠姐 2020-12-09 09:03

This is homework

I\'m working on implementing a linked list class for my C++ class, and the copy constructor has be very confusing for me.

T

5条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-09 09:49

    You forgot the line return; after

    if( v.head == 0 )
        head = 0;
    

    You need to get out, right?

提交回复
热议问题