For C++, it could be something like:
void someFunction(int size)
{
Vector3D* randomArray;
randomArray = new Vector3D[size];
DoSomethingWithTheArray(randomArray, size); // You'd probably have
to tell the called function how big the array is
delete [] randomArray;
}
It would be better to use the Standard Library:
#include <vector>
Void someFunction(int size)
{
std::vector<Vector3D> randomArray;
PopulateTheArray(randomArray); // Note that you don't have to tell
the array how big it's going to be. It
// will grow itself as
you add elements to it.
DoSomethingWithTheArray(randomArray); // The vector<> object knows
how big it is; you don't need a size argument
} // You don't need to explicitly free any memory
RobR
Robert D. Richardson
Product Engineer Software