Create object in array

I already posted this question in the adafruit forum, but I think someone here can answer it as well.

I bought a motorshield from Adafruit for my robotics project. It comes with an AFMotor library from which I can create an object representing a DC motor. To create this object I have to supply two parameters.

The example shows the command

AF_DCMotor motor(2, MOTOR12_64KHZ); // create motor #2, 64KHz pwm

to define an object called motor with the given specs. But I want to define multiple motor objects in an array where the max number of the array can be defined with a Const value:

const int mm = 4;
AF_DCMotor Motor1[mm];

and then set the values like the motor numbers and frequency.

I want my code to be flexible to use in more than one project without having to change a lot of code in the Arduino sketch. Is there a way to create this array of objects and still set their properties (obviously the motornumber is not the same for all created objects...)?

It isn't pretty, but can't you do something like:

const int mm = 4;

AF_DCMotor motor(2, MOTOR12_64KHZ); // create motor #2, 64KHz pwm 
// more motor1, motor2 etc.

AF_DCMotor* Motors[mm] = {&motor, ... };

I do not know if this uses correct parameters, but something on the likes of this:

AF_DCMotor motors[4] = {
 AF_DCMotor(1, MOTOR12_64KHZ),
 AF_DCMotor(2, MOTOR12_64KHZ),
 AF_DCMotor(3, MOTOR12_64KHZ),
 AF_DCMotor(4, MOTOR12_64KHZ)
};

@AlphaBeta: I think your construction is possible, but is there a way to do this with a given const for the number of motors? I need to define the motors at startup but this is with a variable number of objects in the array. I just can't seem to get this right with a variable number of objects in the array.