Jun 17, 2018 at 10:48am UTC
Hey guys. Sorry if this is trivial but I came across some function parameter syntax that I've not seen before and was wondering if someone could explain it to me.
void myFunction( std::vector<double> (¶m)[3] );
What is this function expecting to be passed in to it?
Jun 17, 2018 at 11:20am UTC
param is a reference to an array of 3 vectors of doubles.
1 2
std::vector<double > vecArray[3]; // creates an array of 3 vectors
myFunction(vecArray); // passes it to the function
Last edited on Jun 17, 2018 at 11:42am UTC
Jun 17, 2018 at 11:36am UTC
Ah stupid me, of course it is. Thanks for the reply. It's been so long since I've used raw arrays that their syntax has apparently become alien to me.
Thanks again.