Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <conio.h>
- #include <string>
- #include <vector>
- using namespace std;
- #define ID_EXIT 0
- #define ID_WYSWIETL 1
- #define ID_DODAJ 2
- #define ID_USUN 3
- #define ID_EDYTUJ 4
- class Student{
- public:
- Student(string imie, string nazwisko, string kierunek, float srednia);
- string nazwisko;
- string kierunek;
- float srednia;
- };
- Student::Student(string imie, string nazwisko, string kierunek, float srednia){}
- class Baza{
- public:
- ~Baza(); ///czyszczenie kontenera
- bool AddEl(string imie, string nazwisko, string kierunek, float srednia);
- bool EditEl(vector < Student >::iterator it);
- bool EraseEl(vector < Student >::iterator it);
- FILE * LoadFile(char * sciezka);
- void ReadFileAndFillData(FILE *file);
- private:
- vector<Student> Baza;
- };
- Baza::~Baza(){}
- bool Baza::AddEl(string imie, string nazwisko, string kierunek, float srednia){}
- bool Baza::EditEl(vector < Student >::iterator it){}
- bool Baza::EraseEl(vector < Student >::iterator it){}
- FILE * Baza::LoadFile(char * sciezka){}
- void Baza::ReadFileAndFillData(FILE *file){}
- class Baza Studenci;
- int main()
- {
- Studenci.ReadFileAndFillData(Studenci.LoadFile("baza_danych.txt"));
- int wybor;
- while(true)
- {
- cin >> wybor;
- switch(wybor)
- {
- case ID_EXIT:
- delete Studenci;
- return 0;
- case ID_DODAJ:
- string imie, nazwisko, kierunek;
- float srednia;
- /// cin cin cin cin
- Studenci.AddEl(imie, nazwisko, kierunek, srednia);
- break;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement