problem in linked list

hello every body
i want to know how to save a linked list int a text file and how to load a file in a linked list ??
any one can help me and give me a simple example code
thanks in advance
a silly recursive solution (it is generally better to use loops when you can, I'll leave them for you to figure out):
1
2
3
4
5
6
void print(ListNode* node){
   if(node){
      std::cout << node->string;
      print( node->next );
   }
}
Topic archived. No new replies allowed.