Original Post
I'm trying to open a file from a folder, where the filename is stored in another file (its for a heavily scripted RPG ive posted about a couple of times before here, shameless plug is at the end of the post). Basically im storing the filename as a string, and trying to insert the directory past into the start of it using insert, then trying to open that file. but apparently the open function cant convert from a string to a char *. is there anyway around this or will i have to replace my string with a char array? I thought char arrays were bad and strings were good. anyway, heres some code: actually trying to open the file:
beast_file.open (beastfile.insert(0, "scripts//creatures//")); Plug: http://www.harrysite.net/forums/viewtopic.php?f=28&t=206&start=0 It actually sort of resembles a game now, like a very basic roguelike. I think its pretty good for not only a first game, but a first real program (excluding things like hello world and a thing which worked out the area and perimiter of a rectangle)