c++ - Reading Linked List from txt file (comma separated) -


i wondering what's best way read linked list text file?

i've got write file system working, i'm unsure of how can "reverse" such , populate linked list?

he's current write file code:

void linkedlist::writefile() {     ofstream myfile;     node* thisnode = head;     myfile.open("example.txt");          {         myfile << thisnode->shape<< ",";         myfile << thisnode->colour << ",";         myfile << thisnode->size << ",";         myfile << thisnode->type << ",";         myfile << thisnode->volume << ",";         myfile << thisnode->density << ",";         myfile << thisnode->capacity << ",";         myfile << "\n";         thisnode = thisnode->nextnode;     } while (thisnode != null);      myfile.close(); } 

i'm open suggestions! :)

thanks.


Comments

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -