Jump to content

  • Log In with Google      Sign In   
  • Create Account


#ActualBacterius

Posted 18 November 2012 - 11:10 PM

The code as presented will not compile, L has not been declared in main(). If your intention was the "list *L" line. then the reason it crashes is because you have not allocated space for the list which L should point to... you need a malloc (and a free) somewhere.

This is really C code with an cout thrown it, btw, not really C++.


Never mind.

#1Bacterius

Posted 18 November 2012 - 10:25 PM

The code as presented will not compile, L has not been declared in main(). If your intention was the "list *L" line. then the reason it crashes is because you have not allocated space for the list which L should point to... you need a malloc (and a free) somewhere.

This is really C code with an cout thrown it, btw, not really C++.

PARTNERS