-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDirectory.h
More file actions
33 lines (32 loc) · 828 Bytes
/
Directory.h
File metadata and controls
33 lines (32 loc) · 828 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
#pragma once
#include <iostream>
#include <string>
#include <fstream>
using namespace std;
class Directory
{
struct Company {
string CompanyName;
string CompanyOwnerFio;
string CompanyPhone;
string CompanyAddress;
string CompanyTypeOfActivity;
};
string FileName;
Company* mas;
int size;
void Print(int);
public:
Directory(const string&);
string addCompany(const string&, const string&, const string&, const string&, const string&);
void searchByName(const string&);
bool findName(const string&);
void searchByOwnerFio(const string&);
void searchByCompanyPhone(const string&);
void searchByCompanyTypeOfActivity(const string&);
void readFile();
void saveToFile();
void ShowCompany();
int getSize();
~Directory();
};