Advertisement
Guest User

Untitled

a guest
Mar 28th, 2017
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.02 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int menu,ilosc=1;
  6. char *baza [100];
  7.  
  8. class Vehicles
  9. {
  10. public:
  11. string marka, model;
  12. int rok, cena, przebieg;
  13.  
  14. Vehicles();
  15. Vehicles(string, string, int, int , int);
  16. void dodaj();
  17. };
  18.  
  19. Vehicles::Vehicles(string marka, string model, int rok, int cena, int przebieg) {
  20. this->marka = marka;
  21. this->model = model;
  22. this->rok = rok;
  23. this->cena = cena;
  24. this->przebieg = przebieg;
  25. }
  26.  
  27. Vehicles::Vehicles() {
  28.  
  29. }
  30.  
  31. void Vehicles::dodaj()
  32. {
  33. ilosc++;
  34.  
  35. Vehicles tab[5];
  36. baza[0] = new Vehicles()
  37. }
  38.  
  39. int main()
  40. {
  41.  
  42. for (int i = 0; i < ilosc; ++i) {
  43. baza[i] = new string[5];
  44. }
  45.  
  46.  
  47. cout << "Witaj, co chcesz zrobic?" << endl;
  48. cout << "1. Dodaj pojazd"<<endl;
  49. cout << "2. Edytuj baze" << endl;
  50. cout << "3. Przegladaj baze" <<endl;
  51. cout << "4.Wyjdz" <<endl;
  52. cin >> menu;
  53.  
  54. switch (menu)
  55. {
  56. case 1:
  57. {
  58. void dodaj();
  59. }
  60.  
  61. }
  62. return 0;
  63. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement