Code:
bool **m_shipsDamage;
short int **m_shipsLength;
Code:
Ship::Ship(short int length)
{
m_shipsDamage = new bool * [2];
m_shipsLength = new short int * [2];
for (short int i = 0; i < 2; i++)
{
m_shipsDamage[i] = new bool[length];
> m_shipsLength[i] = new short int * [2];
}
};
> BattleshipV2.cpp(182) : error C2440: '=' : cannot convert from 'short ** ' to 'short *' Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast.
I have no idea what this is.. nor how to fix it.. I got a few other errors when making a refrence to the matrix, but I fixed it by sticking a * infront.