3 ms·
Also, the struct in C++ is allocated on the heap. Not correct. Just as in C, in C++, all objects - be they primitive types, instances of structs or classes - a
by scott_s 13y ago
Also, the struct in C++ is allocated on the heap.
Not correct. Just as in C, in C++, all objects - be they primitive types, instances of structs or classes - are allocated on the stack by default. If you want them allocated on the heap, you must explicitly request it.
- digitalsol 13y agoYou are right, that was a typo. I changed that yesterday.