sorry to double post. I did cheak the forum rules and they never said it isn't allowed but I am sure its going to be one of those un written rules like necroing.
I know it seams I am getting everyone to do everythink for me but thats because my only resource at the moment is the internet and cprogramming. If I can get this small project running I will proberly invest some money in soem books.
the point is I am now having issues with setting the variable to null and reading the file. Yes I am such a pain.
Code:
int mapReload()
{
filename = "C:\\Dragonways\\Map\\" + mapfile + ".txt";
/* reset all map variables to blank */
mapdescription = "NULL";
north = "null";
south = "null";
east = "null";
west = "null";
ifstream readMap(filename.c_str());
getline(readMap,mapdescription);
getline(readMap, north);
getline(readMap, south);
getline(readMap, east);
getline(readMap, west);
cout << mapdescription;
cout << "\ndebugging";
}
The first thing is the compiler things the null value is a string of letters called n-u-l-l and not acterly meaning nothing. Second of all it would acterly put the first line into the variable map description. Everything else is printing out fine so its 100% a reading issue.
thanks
zidsal
p.s anyone know any nice c++ books to buy>