S3_Cpp/Aufg3/Phonebook.h
2024-11-11 22:47:51 +01:00

41 lines
1008 B
C++

#ifndef PHONEBOOK_H
#define PHONEBOOK_H
#include <string>
#include <vector>
typedef struct contacts Kontaktdaten;
void addContact(Kontaktdaten* person, std::vector<Kontaktdaten*> *Telefonbuch);
void deleteAllContacts(std::vector<Kontaktdaten*> *Telefonbuch);
void printAllContacts(std::vector<Kontaktdaten*> *Telefonbuch);
void saveAllContacts(std::vector<Kontaktdaten*> *Telefonbuch, std::string *fileName);
int exponentiate(int base, int exponent);
int intStringToInt(std::string input);
void readContactsFromFile(std::vector<Kontaktdaten*> *Telefonbuch, std::string *fileName);
void addFirstSetOfContacts(std::vector<contacts*> * Telefonbuch);
void addSecondSetOfContacts(std::vector<contacts*> * Telefonbuch);
/*
Kontaktdaten * createContact(std::string firstName, std::string lastName, int number) {
Kontaktdaten person = new Kontaktdaten;
person.firstName = firstName;
person.lastName = lastName;
person.number = number;
return & person;
}
*/
void Aufg3Main();
#endif //PHONEBOOK_H