is this allowed to pass an array by reference ?
void foo(double& *bar)
Seems that my compiler says no. Why? What is the proper way to pass an array by reference? Or a work around? I have an array argument that my method should modify and that I should retrieve afterwards. Alternatively, I could make this array a class member, which works fine, but it has many drawbacks for other part of my code (that I would like to avoid).
Thanks and regards.
std::vectoror similar?std::vectoris obviously superior if the size is dynamic/unknown, but in cases where the size is always the same, it would be overkill, and insteadstd::arrayresolves the syntactic ugliness while also conferring value semantics.