@ljanss.bsky.socialLuc Janss @ljanss.bsky.social
2025-10-22 12:44 UTC
Confused about vector resize() and reserve() in #C++? Resize modifies the size and fills default values; after resize'ing use [] to fill elements. Reserve only reserves memory in the background but size remains zero; after reserve use push_back to fill the vector. Don't confuse these two!
1 likes, 0 reposts, 0 replies
3 Next post4 More from @ljanss.bsky.socialBackBluesky home