Skip to main content
gamedev.net
🔒 Locked

Gneral Tree problems

Started by Tera_Dragon 1 reply 300+ views
Original Post
Tera_Dragon
Tera_Dragon
I am making a hacker sim game and have made a general tree to store all of the data in the hard drive. This is working fine, I can save the data perfectly, but the problem arises when I try to load the data. i am using recursion to loop thorugh all folders and files in the folders and loding the data. I have checked and each piece of data loads in correctly, but when the loading function ends and all of the functions finish and return (using recursion) all of the folders in a directory get the same name and the same is for files. I have looked through this for ages and got many other people to look through it as well, but no one can find what the error is. If you are willing to help please email me or contact me through aa IM at ither rhysbj1@hotmail.com or my aim s/n BrrdgJnsS Thanks for any help Tera_Dragon
____________________________________________________________Programmers Resource Central
ToohrVyk
ToohrVyk
From the sound of it, you are doing something like :

char * folder_name;char * temp;read_stream >> temp; //or fread(read_ptr,temp);folder_name = temp;


Is that it?
Tera_Dragon
Tera_Dragon
I'm using strings. And I do something like that but do not always read the file data into a temp value. I only do that when I have to.
Tera_Dragon
____________________________________________________________Programmers Resource Central

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.