There are quite a few problems here - the biggest being that you just don't seem to have a real understanding of the C++ language itself(much less programming in general). I don't say that to be mean - just being realistic. What I mean is, here you are, trying to code a database, when you should be working on more pressing problems(mastering the basics, specifically). So here is my suggestion: using whatever books you have, go through every single exercise until your understanding is *completely* thorough. Then you will be able to solve problems such as these without much effort. Step-by-step is the key phrase here. Good luck.
- Sebastian Garth
"The process of preparing programs for a digital computer is especially attractive, not only because it can be economically and scientifically rewarding, but also because it can be an aesthetic experience much like composing poetry or music." - Donald Knuth
|