
ashish srivastava wrote:
Hello I am having some problem in executing the code of boost_serialization. I'm trying to serialize the static class member variable. For that purpose I have wrapped the int static variable to tracked_int static variable. Please find the code attached with this mail.
This is how I'm running the code and getting the segmentation fault. --------------------------------------------------------- $ g++ test_serialization_linklist.cpp -l boost_serialization $ ./a.out do u want to continue adding more nodes into the link list (y/n) ??y do u want to continue adding more nodes into the link list (y/n) ??y do u want to continue adding more nodes into the link list (y/n) ??n 5 6 6 6
the number of nodes present in the list = 4 Segmentation fault
I looked at the program. you save one instance through a pointer ar & start you load one instance though a pointer ar & newg then you try to loop starting at newg. This won't work as there is only one pointer. Try using std::list rather than your own "list" class. Robert Ramey