Guest User

Matrix.cpp

a guest
Sep 18th, 2020
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.72 KB | None | 0 0
  1. #include <iostream>
  2. #include <vector>
  3. #include <map>
  4. #include <algorithm>
  5. #include <fstream>
  6. #include <ctime>
  7. #include <string>
  8.  
  9.  
  10. class Matrix
  11. {
  12. public:
  13.     Matrix()
  14.     {
  15.         this->size_ = 3;
  16.         this->matrix_.resize(size_ * size_);
  17.         for (int i = 0; i < size_ * size_; i++)
  18.         {
  19.             matrix_[i] = 'W'; // Determing rondom colors for side of Cube
  20.         }
  21.     }
  22.  
  23.     Matrix(std::vector<char> &position) : Matrix()
  24.     {
  25.         for (int i = 0; i < size_ * size_; i++)
  26.         {
  27.             matrix_[i] = position[i]; //  Determing colors for each sell of side of Cube
  28.         }
  29.     }
  30.  
  31.     ~Matrix()
  32.     {
  33.     }
  34.  
  35. protected:
  36.     std::vector<char> matrix_;
  37.     int size_;
  38. };
Add Comment
Please, Sign In to add comment