Hello everyone,
I created a linked list using the stl library like so:
list<class> name_of_list;
I initilized the list as a global yet when I access it from another area in my code it is empty. How can I call the list by reference. Thanks..
Don't know how did u initilize it.
Possibly it can be that you are initilizing it with the value from local objects and intead of copying data from object it puting that address and once u are out the scope the address is invalid.
Can you just put the piece of code for further calirification.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.