Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

There's really no need for the pointer inside the struct. You could just use a flexible array member (introduced in C99) or a "struct hack" if you're still using C89.


If you do this, the Vector could likely move when resized.


True, the vector_append function would have to return a pointer to the new location; this might or might not be a problem, depending on how your program is structured.


Mooby, you're hellbanned and showing as [dead].




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: