![]() |
|
#1
|
|||
|
|||
Help with Classes and database arraysHello all,
I am in the process of designing a program (a savings account database program) and I have run into a few subtle errors I need to resolve. The whole program consists of 2 header files, 2 source code files (each with member function definitions) and 1 driver file. I have only listed one header file and a simple member function. I am having specific trouble completing this one member function. Here is the class header file: CPP / C++ / C Code:
First off, in the private section, I do not understand the declaration of the database array, SavingsAccount db[MAX_DB]. I presume it is an object of class SavingsAccount? Here is my member function definition: CPP / C++ / C Code:
What I need to do is store each account number and balance entered in a record in the database array. (Later, the array will be output to a text file). I am having trouble doing this... the array was not assigned a specific type in the header file I believe. Any help is most appreciated. |
|
#2
|
|||
|
|||
|
Let me also post the SavingsAccount header file, if it helps solve some of my other problems w/ this assignment:
CPP / C++ / C Code:
So, basically, I need to be able to enter an (unsigned int) account number and a (float) balance amount; then I need to store this data in a record in the database array. I am getting errors in my previous post, above this one and I don't know how to work them out. Any guidance would be cherished! :-P |
Recent GIDBlog
Toyota - 2008 September Promotion by Nihal
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The