S_New4/accountManager.h
2019-08-31 20:35:11 +02:00

30 lines
566 B
C++

#ifndef ACCOUNTMANAGER_H
#define ACCOUNTMANAGER_H
#include <iostream>
#include <vector>
#include <sys/stat.h>
#include <fstream>
struct Account {
std::string Email, Password;
};
class AccountManager
{
public:
AccountManager(std::string pathToFile, std::string pathToAccountNumberFile);
Account getNextAccount();
size_t getLastAccountNumber();
private:
std::vector<Account> accounts;
std::string pathToAccountNumberFile;
int setLastAccountNumber(size_t number);
int writeDefault(std::string path);
};
#endif // ACCOUNTMANAGER_H