Joined
Last Seen
0 Reputation Points
100% Quality Score
- Upvotes Received
- 1
- Posts with Upvotes
- 1
- Upvoting Members
- 1
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
0 Endorsements
Ranked #44.2K
[CODE] myLinkedList ( ) { //TESTED head = NULL; last = NULL; cout<<"Linked List is created with default constructor\n"; } myLinkedList ( myLinkedList &arr) { //TESTED if (arr.head == NULL){head=NULL; last=NULL;} else{ head = NULL; last = NULL; temp2 = new node; temp2 = arr.head; while(temp2!=NULL){ insertLast(temp2->item); temp2 = temp2->next; … |
|
node &getNode(int index) { //NOT TESTED if (index <= getLength() || index >= 1){ temp = new node; temp = head; for (int i=index-1; i>0; i--){ temp = temp->next; } return &temp; } } Hi everyone, I receive this error msg: invalid initialization of non-const reference of type 'node&' from … |