MeehoweCK

Untitled

Jan 9th, 2023
1,061
-1
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.48 KB | None | 0 1
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. enum class Pole
  6. {
  7.     O, X, puste
  8. };
  9.  
  10. class Plansza
  11. {
  12.     Pole** tablica;
  13. public:
  14.     Plansza(short d);
  15.     ~Plansza();
  16.     void wypisz();
  17. };
  18.  
  19. Plansza::Plansza(short d)
  20. {
  21.     tablica = new Pole*[d];
  22.     for(short i = 0; i < d; ++i)
  23.         tablica[i] = new Pole[d];
  24.     for(short i = 0; i < d; ++i)
  25.         for(short j = 0; j < d; ++j)
  26.             tablica[i][j] = Pole::puste;
  27. }
  28.  
  29. int main()
  30. {
  31.    
  32.     return 0;
  33. }
Advertisement
Add Comment
Please, Sign In to add comment