Facebook
From Big Cassowary, 5 Years ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 240
  1. #include <iostream>
  2. #include <math.h>
  3. #include <cmath>
  4. using namespace std;
  5.  
  6. class LiczbaKlientow
  7. {
  8. public:
  9. const int p=10;
  10.      int tab[p];
  11.  
  12.      LiczbaKlientow * NowaOsoba = new Klient tab[p];
  13.     int tab[p] = new int [p];
  14.  
  15.  
  16. };
  17.  
  18. class Klient
  19. {  public:
  20.     string imie;
  21.     string nazwisko;
  22.     string adres;
  23.     double numer;
  24.     void klient();
  25. };
  26.  
  27.     void Klient::klient(){
  28.  
  29.     cout<<"Podaj imie"<<endl;
  30.     cin>>imie;
  31.     cout<<endl;
  32.  
  33.     cout<<"Podaj nazwisko"<<endl;
  34.     cout<<endl;
  35.     cin>>nazwisko;
  36.  
  37.     cout<<"Podaj adres"<<endl;
  38.     cout<<endl;
  39.     cin>>adres;
  40.  
  41.     cout<<endl;
  42.     cout<<"Podaj numer"<<endl;
  43.     cin>>numer;
  44.     cout<<endl;
  45.  
  46.     }
  47. int main()
  48. {
  49.  
  50. cout<<"1. Pokaż listę klientow"<<endl;
  51. cout<<"2. Dodaj klienta"<<endl;
  52. cout<<"3. Usuń klienta"<<endl;
  53. cout<<"4. Modyfikuje klienta"<<endl;
  54.  
  55. int liczba;
  56.  
  57. cin >> liczba;
  58.     switch( liczba )
  59.     {
  60.     case 1:
  61. cout<<"nic"<<endl;
  62. break;
  63.     case 2:
  64.          Klient * NowaOsoba = new Klient;
  65.  
  66.  NowaOsoba->klient();
  67.  
  68.  cout<<endl; break;
  69.  
  70.     };
  71.  
  72.  
  73.  
  74.  
  75.   /*  int n=10;
  76. int NowaOsoba[n];
  77. for(int i=0; i<10;i++)
  78. {
  79.  
  80.  ListaKlientow * NowaOsoba[i] = new ListaKlientow;
  81.  
  82.  NowaOsoba[i]->klient();
  83.  
  84.  cout<<endl;
  85. }
  86. */
  87.     return 0;
  88. }
  89.