Segmentation Fault at runtime in c++ -


I have determined that the error occurs when I toString () my Linkedist class , more specifically when the line 8 or 9 is executed

  string LinkList :: toString () const {int traverse = 1; Node * key = head; Wire south; While (size> = trousers) {sout + = "value =" + ---> "+"; That = that- & gt; next; Cross ++; } Return south; }   

This linkedlist uses a node class to store data that looks like this, and Linkedist class has its own integer shape variable and an indicator for the first node < / P>

  class node {friend class linked list; Private: std :: string s; Node * next; Node (std :: string street, node * nextn); };   

I'm guessing that this is some dirty mistake in my part, but I can not understand it by stalking on it or by reading the tutorial again on the signs.

The code is defective below. Please add a log for the blank check

  that = that-> Next (if he == blank) {// std :: cout & lt; & Lt; "A null node was found \ n"; break; }    

Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -