database

I need to create a database that will store data such as ID's and serials. Id like to stay away from things like sqlite if possible. Also I do not want to save the data after the program has terminated, if it does save it then it will just have to be deleted when it restarts. Thank you
1
2
3
4
5
6
7
8
9
struct database
{
    int ID;
    int serial;
};

int main() {
    database db[NB_ENTRIES];
}

;)
Last edited on
One of the things I never really took the time to learn in c++ was structures... That makes so much sense and is exactly what I wanted thank you.
You might also want to look at containers:

std::vector
http://cplusplus.com/reference/stl/vector/

std::map
http://cplusplus.com/reference/stl/map/
Topic archived. No new replies allowed.