Question On Classes

I'm working on a project and have encountered a bit of a predicament. I am converting a game I created in python to Arduino code and in the python code I store an object within an array. I was wondering if there is a way of doing the same in Arduino.

Python code -> self.blocks*= Block(blockCOL, blockROW, blockCLR)*
Arduino code (that doesn't work) -> Block blocker(blockCOL,blockROW,clr); _blocks = {blocker};
Basically I want to be able to store the object created from the Block class within an array. Any help would be greatly appreciated.
Thanks

Create an array of pointers to your class.

Please remember to use code tags when posting code.

AWOL, would you mind giving me an example of how that would look? I'm not too sure how to go about creating an array of pointers

I'm not too sure how to go about creating an array of pointers

Just like any other type:

Block *someBlocks[someNumerOfBlocks];
myClass* arrayOfmyClass [myArraySize];

Or, any array of objects:

Block blocker(blockCOL,blockROW,clr);
Block _blocks[] = {blocker};

That's a very short array. :frowning:

AWOL:
That's a very short array. :frowning:

For a very small screen.

AWOL:
That's a very short array. :frowning:

It scales:

Block blocker0(blockCOL0,blockROW0,clr0);
Block blocker1(blockCOL1,blockROW1,clr1);
Block _blocks[] = {blocker0, blocker1};