Say I have a class Pawn with a constructor Pawn(enum colors {white,black} Color).
Now, somewhere else in my program, I have to make a 2D array of pointers pointing to pawns.
First of all, how can I create a normal 1D array with 5 elements? Pawn myPawn(black) works, but how does Pawn myPawnArray[5] work? Is there a way around f.e. Pawn array[2] = {Pawn(Pawn::white), Pawn(Pawn::black)}; (I've thought about pointers but how is this done?)
Second question, how can you again make an array of pointer variables? In this example, an array with pointers to pawns? I need to refresh this again because I haven't worked with it for about a year... I'm pretty sure it's done by **array or *array[], but I fail to see why *array[] works again.
After that I should manage to figure it for *array[][] which is a 2D array of pointers pointing to pawns...
Thanks