Database for C++

Hello, I am working a program in C++ that I would like to use to enter information, and I would like some help in creating a database to keep this information. For example:

1
2
3
4
cout << "Approximately how much time (in minutes) did you spend reading? ";
cin >> ts1;
cout << "Approximately how much time (in minutes) did you spend on the computer? ";
cin >> ts2;


I want to use the data entered for the variables and store this information. How would I go about doing that?
Where do you want to store the information? In a file or in variables. If you want in a file you should use
1
2
ofstream print("data.txt");
print<<your_data_here;

If you want in variables then your data is already stored!
Last edited on
An excel file would probably be best, because the data will be entered several times. How compatible are excel files with C++? What extra things would i have to do?
Topic archived. No new replies allowed.