w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
When adding elements to linked list and writing out all elements the first element doesen't write out

you don't print your last item...

  for(NodePtr temp = lis.head; temp != NULL; temp =
temp->getLink())
  {
     outs << " ";
     outs << temp->getData();
  }

should do it (not tested :) .





© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.