-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdatabase.h
More file actions
43 lines (31 loc) · 723 Bytes
/
database.h
File metadata and controls
43 lines (31 loc) · 723 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
#ifndef DATABASE_H_INCLUDED
#define DATABASE_H_INCLUDED
#include <iostream>
#include <fstream>
#include <map>
#include <string>
using namespace std;
struct infoProduct{
string name;
float price;
int amount;
string city;
};
multimap < string , infoProduct > DatabaseProduct;
struct userInfo {
string password;
float balance;
void buyGetBalance( float &balance , float pretProdus, unsigned int &cantitate ){
if ( balance - pretProdus >= 0 )
{
balance -= pretProdus;
--cantitate;
}
else
{
cout << " Nu ai destui bani ";
}
}
};
map < string , userInfo > DatabaseUsers;
#endif // DATABASE_H_INCLUDED