For my programming class I must create a simple banking program with a DB in Array. I've got all that working great. But I'm stuck at one of the points in the task - each function must be in a separate header file.
Can someone help me move one of the functions to a header? :)
Here is what I try to do it:
1: Make add.h and add.cpp files to move the function to add a client
2: Add #include "add.h" to the main file
3: Move this to add.cpp
Here is the whole task (translated from Latvian, since the class is in Latvian)
Based on this structure:
struct clientData // client Data
{
int accNum; // account number
char Sur[15]; // surname
char Name[10]; // name
float balance; // balance
};
Create database in form of an array. There must be a main menu with such entries:
* Add entry
* Delete entry
* Print out all entries
* Find an entry (by account number)
* Change account balance (find account by number and input a value to add to the balance)
* Show all clients with debt
* Count entries
* Exit
Additionaly the program should have this:
* Account number must be the index value
* Array size - 100 entries
* Each operation must be in a separate funktion * Each function must be in a separate header file
* After each operation the user has to be taken back to the main menu.
More or less I have everything except that each function must be in a separate file.