I have a very simple piece of code as follows:
Letter* Vakje::geefLetter() const
{
return m_letter;
}
The class Vakje gets initialized with a NULL-pointer for m_letter
, but I'm still getting a read access violation error, could someone please help?
this is the code that calls the function:
bool Spelbord::positionIsEmpty(int rij, int kolom) {
if (vakjes[rij][kolom]->geefLetter()==nullptr) return true;
else return false;
}