I just started c++ programming, and am trying to make a very simple database just to exercise some of the concepts i've learned. I am trying to make a file for each user who enters in the data. By the way It is far from complete, I have some other functions of the program i will work on after I finish this. Here is my code
Ok so when I try to compile this code, I get an error on the [code] DATABASE.open(File);[\code] What I am trying to do is use the input from the user and turn that into the name of the file. How do I use user input to be used as my file name???
You need the name of the file in quote DATABASE.open("File.txt");
If you are wanting to constantly change this file name then i think you need to add a special function on the end of the string name otherwise you'll get a compile error.
EDIT: the function needed might be this .c_str() however i'm not sure (found this in another post on this forum) DATABASE(stringname.c_str());
P.S. it's [ / code ] to end the example code properly. :)