E
Eps
Hi,
I need to pass a dynamic number of strings to a function, I can think of
two ways.
1) An array of char arrays, I would also make a note of the length of
top level array and pass that in to the function.
2) An array of char arrays, I would add an extra element to the top
level array and set it to null, then I know when to stop when iterating
through.
Both of these seem a bit fragile, especially if you have ever used any
of the nice containers in the c++ STL.
Are there any other ways I could do this ?.
Thanks.
I need to pass a dynamic number of strings to a function, I can think of
two ways.
1) An array of char arrays, I would also make a note of the length of
top level array and pass that in to the function.
2) An array of char arrays, I would add an extra element to the top
level array and set it to null, then I know when to stop when iterating
through.
Both of these seem a bit fragile, especially if you have ever used any
of the nice containers in the c++ STL.
Are there any other ways I could do this ?.
Thanks.