The size of an array must be a compile time constant. Variable Length Arrays are not allowed in C++. So since you seem to know about vectors you should probably use a vector<vector<double>> for your stats variable.
Also if stats is an array then your function prototype is probably incorrect:
The above prototype expects you to pass a reference to a single double, a vector<string> reference, and an int. What are you trying to pass to this function?
void getdata (double &stats, vector <string> &names, int num);