1: Get the following 4 files and put in one dir. README : This file : http://pastebin.org/7125 dfs.cpp : http://pastebin.org/7124 makefile : http://pastebin.org/7121 graph.xml : http://pastebin.org/7122 2: make dfs # You must have the compiled graphml reader to successfuly run make. # I have put graphml.o in my aux dir, as you can see from my make file. # You may need to adjust my makefile slightly. 3 $ dfs < graph.xml The output I get is: ************************************************************************************************** inside function - OK. write_data eWeight: Light write_data eWeightCopy: Light outside function - the data in eWeightCopy has been lost! write_data eWeight: Light write_data eWeightCopy: out.xml (END) ************************************************************************************************** HERE IS THE PROBLEM. Notice where it says "inside function - OK." eWeight and eWeightCopy both have correct data, namely "Light"; But where it says "outside function - the data in eWeightCopy has been lost!" eWeight still has correct data, but eWeightCopy 's data has just vanished. If you look at dfs.cpp you'll see that when write_data(g) is run inside the function that copys eWeight to eWeightCopy, all is OK. But when write_data(g) is run outside the function the data is lost. Not being able to store data for later retrieval is a show stopper. Can anyone suggest a workaround. Thanks much -Caligula