-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.h
More file actions
48 lines (36 loc) · 956 Bytes
/
main.h
File metadata and controls
48 lines (36 loc) · 956 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
//
// Created by Paul on 09.01.2024.
//
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#ifndef FINAPPV2_MAIN_H
#define FINAPPV2_MAIN_H
#define MAXUSERS 20
#define MAXACCOUTNS 10
#define USERSFILE "users.txt"
#define MAXCHARLENGTH 40
typedef struct {
char type[MAXCHARLENGTH]; // deposit, withdrawal, transfer, payment, etc.
char date[MAXCHARLENGTH];
char parentAccount[MAXCHARLENGTH];
char destinationAccount[MAXCHARLENGTH];
char description[100];
double amount;
} Transaction;
// Structure to represent a financial account
typedef struct {
char type[MAXCHARLENGTH];
char name[MAXCHARLENGTH];
char owner[MAXCHARLENGTH];
Transaction transactionList[30];
int transactionCount;
double balance;
} Account;
typedef struct {
char username[MAXCHARLENGTH];
char password[MAXCHARLENGTH];
Account accountList[MAXACCOUTNS];
int numberOfAccounts;
}User;
#endif //FINAPPV2_MAIN_H