-
You aren't supposed to pass it as a char** pointer.
Why I used vector to solve all problems is because it never changes type.
Code:
std::vector< std::vector<std::string> > v;
void myfunc(std::vector< std::vector<std::string> >& v)
{
}
Same definition in the function and same argument in the called function. No pointer mess, no special syntax. And you can get the size at any time.
-
Yes, that's why MultiArray is the way to go.
Code:
boost::multi_array<std::string, 2> ar(4, 4);
void myfunc(boost::multi_array<std::string, 2> &ar);
-
Yeah, either one is fine, of course, so long as it isn't a raw array.