How to pass this vector as a parameter
roaming2man opened this issue · comments
Roaming Man commented
It will be very nice if there is a code to pass this cvector as a parameter in example.c or test.c file.
I tried like followings but doesn't work.
int foo(cvector_vector_type(int)* v) {
cvector_push_back(*v, 55);
cvector_push_back(*v, 66);
cvector_push_back(*v, 77);
return 0;
}
int main() {
... skp ...
cvector_vector_type(int) v = NULL;
foo(&v);
... skip ...
}
How can I pass this vector as a parameter?
TVKain commented
@roaming2man #17 its similar to my issue
Roaming Man commented
@TVKain Yes, that's exactly what I've been looking for. Thanks!