I want an operator that will assign values of figure from one pointer to another.
figure& operator=(const figure* source) {
type = source->type;
height = source->height;
playerNumber = source->playerNumber;
return *this;
}
boards[board - 1][side][place - 1]=temp;
Left and right values are pointers. My main problem is that it also assigns address of temp. So when I delete temp, it also deletes boards[board – 1][side][place – 1].
1