Tag Info

New answers tagged

6

C++ can do it the same way C does. All C++ gives you is easier-to-use containers that wrap much of the low-level detail. For example, a string class can (and does) hold a block of memory on the stack for short strings, only allocating a heap buffer for larger ones. This buffer is exactly like a C string buffer, if the string resizes, the string class will ...



Top 50 recent answers are included