3 ms·
True, but that can be overcome by another function that just gives you an address to put a new item. You would say, for example: *(int *)vector_expand(v) = 2
by mklencke 15y ago
True, but that can be overcome by another function that just gives you an address to put a new item. You would say, for example:
*(int *)vector_expand(v) = 2;
- anonymous246 15y agoThis is a super-unclean API, but that's just IMHO. We'll just have to agree to disagree that what you've shown above is an acceptable API for a vector module.
- mklencke 15y agoI'm just making it up as I go along, it's not the prettiest thing. What would you do, in C?