Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int menu,ilosc=1;
- char *baza [100];
- class Vehicles
- {
- public:
- string marka, model;
- int rok, cena, przebieg;
- Vehicles();
- Vehicles(string, string, int, int , int);
- void dodaj();
- };
- Vehicles::Vehicles(string marka, string model, int rok, int cena, int przebieg) {
- this->marka = marka;
- this->model = model;
- this->rok = rok;
- this->cena = cena;
- this->przebieg = przebieg;
- }
- Vehicles::Vehicles() {
- }
- void Vehicles::dodaj()
- {
- ilosc++;
- Vehicles tab[5];
- baza[0] = new Vehicles()
- }
- int main()
- {
- for (int i = 0; i < ilosc; ++i) {
- baza[i] = new string[5];
- }
- cout << "Witaj, co chcesz zrobic?" << endl;
- cout << "1. Dodaj pojazd"<<endl;
- cout << "2. Edytuj baze" << endl;
- cout << "3. Przegladaj baze" <<endl;
- cout << "4.Wyjdz" <<endl;
- cin >> menu;
- switch (menu)
- {
- case 1:
- {
- void dodaj();
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement