johnsogg / cs2270

CSCI 2270 - Data Structures & Algorithms - University of Colorado Boulder
47 stars 38 forks source link

A statement is wrong in linked_list driver #3

Closed NirBoneh closed 11 years ago

NirBoneh commented 11 years ago

node* head = init_node(5); cout << "Initial List Contents: " << report(head) << endl; // should be '5' // append a number append_data(&head, 42); cout << "After adding 42: " << report(head) << endl; // should be '42' // append a few more append_data(&head, 32); append_data(&head, 99); cout << "Should be 42, 32, 99: " << report(head) << endl;

It should say "should be 5 42 33 99:" instead of what is written there.

johnsogg commented 11 years ago

Correct. I added the 'init_node' thing afterwards. That's the danger of hardcoding stuff :)

Bugfix incoming.