#Where are "structs" stored in RAM and how do they work?

4 messages · Page 1 of 1 (latest)

echo gust
#

I don't understand in which area of ​​RAM we write "structs", where it is stored when new structures are declared, how structures work in general. This question arose when I was writing a binary search tree. Why is a pointer to a structure needed?

tawny bone
#

first of all, in C++ structs and classes are the same

#

and structs are no different from other objects like int, floats, pointers, etc in terms of where they live in memory

#

there's two main places where you put your objects in C++