I'm creating Conway's Game of life in c++ and I have 2 vectors inside a Class:
#include<vector>
using namespace std;
class Board
{
private:
std::vector<std::vector<bool>>* CurrentFrame;
std::vector<std::vector<bool>>* NextFrame;
public:
Board();
~Board();
};
Board::Board()
{
}
Board::~Board()
{
}
I was wondering if there is any way to change what they point to without creating a reference to them?
ei:
std::vector<std::vector<bool>> CurrentFrame;
Auto* PtrToFrame = &CurrentFrame;