Hello,
I am re-engineering someone elses code and have come across some code I don't really understand.
To keep it simple I have just displayed the code snippets.
I have a class called Board
Now I have another a cpp file that using this class.Code:class Board { private: Board *_boards[10]; public: Board* const* boards() const; . . . }; Board* const* Board::boards() const { return _boards; }
I have this code which I find hard to understand.
I don't know why there is a [i] at the end of the boards() function?Code:Board *board = static_cast<Board*>(boards()[i]);
Any advice would be most gratefull,
Thanks,