| description | Learn how to handle with an Overloaded Constructor |
|---|---|
| title | Overloaded Cunstructor Handling |
| ms.date | 05/11/2023 |
| ms.topic | conceptual |
| author | fejo-git |
| ms.reviewer | --- |
normal constructor
TicTacToeField();
overloaded constructor
TicTacToeField(std::vector<std::vector<int>> field);
implemented overloaded constructor
TicTacToeField::TicTacTieField(std::vector<std::vector<int>> field) {
this->field = field;
std::cout << "I am the constructor that receives the 'field' variable as an argument." << std::endl;
}
constructor call in main function
TicTacToeField f(field);