S_New4/accountManager.h

29 lines
544 B
C
Raw Permalink Normal View History

2019-07-06 20:47:29 +02:00
#ifndef ACCOUNTMANAGER_H
#define ACCOUNTMANAGER_H
#include <iostream>
#include <vector>
#include <fstream>
struct Account {
std::string Email, Password;
};
class AccountManager
{
public:
2019-07-08 20:17:11 +02:00
AccountManager(std::string pathToFile, std::string pathToAccountNumberFile);
2019-07-06 20:47:29 +02:00
Account getNextAccount();
2019-07-08 20:17:11 +02:00
size_t getLastAccountNumber();
2019-07-06 20:47:29 +02:00
private:
std::vector<Account> accounts;
2019-07-08 20:17:11 +02:00
std::string pathToAccountNumberFile;
2019-08-31 20:35:11 +02:00
int setLastAccountNumber(size_t number);
int writeDefault(std::string path);
2019-07-06 20:47:29 +02:00
};
#endif // ACCOUNTMANAGER_H