Memory in structs

Hello,

I wanted to ask about memory in structs. I have a struct that contains a vector that when I try to add more than a certain number of elements (in my case, shared_ptrs of another struct I made), seg faults. Do I need to allocate specific memory for the vector?

If anyone has any idea at why this is happening, it would be very appreciated.
Thank you
The vector maintains its own memory so there is no need to worry about.
The problem must be somewhere else.
Can you show us the code?
thanks anyway its not seg faulting anymore, i think it was just something else (arent seg faults great haha)
Topic archived. No new replies allowed.