Originally Posted by
ted_kingdom
And finally, I want to call a method that would take my array 'SolarSystem' as input:
Another thing you should realize is that none of your functions actually are passed arrays.
For example, this definition:
Code:
void Verlet(int, double []); // a method to implement Verlet algorithm
Is no different than this one:
Code:
void Verlet(int, double*); // a method to implement Verlet algorithm
When you pass an array, you aren't passing an array -- you are passing a pointer to the first element of the array. So what ends up happening is that the array decays to a mere pointer on the receiving function.
Regards,
Paul McKenzie