The easiest way is to use the STL container
. I will assume that is not an option since you are asking this question. Here is one way to do it, assuming the data is of type double.
const int ArraySize = 10;
typedef double Array[ ArraySize ];
typedef struct structArrayStr
Now you can declare an instance of an
, initialize it, and pass it by reference to a your function.
Alternatively, you don't have to use the structure at all. You can pass the array and its size to the function as separate parameters.