hi
im haveing a bit of a dilema. I am using this to create a txt file in a cetain place.
ofstream file("C:\\Documents and Settings\\All Users\\Documents\\filename.txt");
but i want the file name to be read from a string. I know you can use
string str
ifstream inputFile(str.c_str)
but i dont know how to make it work with the designated directory there aswell i have tried lots of things with quotes and what not, but i always get synax errors or literally make a file called "str.c_str"
um yes sory i didnt do that on my previous post but i did do it like that when i tried it in c++
ofstream file("C:\\Documents and Settings\\All Users\\Documents\\"str.c_str());
and i tried it with the quotes after that but neither work