c++ and multidimensional array
What''s wrong with that code.
i am trying to pass a multidimensional array of pointers to a function and copy the pointer, but i got an error message.
C:\DDD\ddd\ddd.cpp(62) : error C2440: ''='' : cannot convert from ''class Brick *[][5]'' to ''class Brick *[][5]''
Here is the code :
class Brick
{
};
class A
{
public:
Brick* tabA[5][5];
};
class B
{
public:
Brick* tabB[][5];
void mafonction(Brick* tabA[][5]);
};
void B::mafonction(Brick* tabA[][5])
{
tabB = tabA;
//on this affectation the compiler says : cannot convert from ''class Brick *[][5]'' to ''class Brick *[][5]''
}
thanks in advance
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement