There is such a class:
class Field { public: Field(sf::Vector2<int> size); ~Field(); sf::Vector2<int> size; bool* tileState; private: }; Field::Field(sf::Vector2<int> size) { this->size = size; this->tileState = new bool[this->size.x][this->size.y]{}; } Field::~Field() { //пока удалять не буду } The problem is that I can not select a two-dimensional array in the constructor but more than anything, what's the problem?