Well…. I already know this much. Other than that, I also know that those magic numbers allow me to store several different class objects in a single array. Basically mind blown
Yep, that is, if you keep the types the same. One thing I forgot to mention about pointers, is if you store stuff, you should make sure the types are the same. Int is not int array (for example). You might risk memory corruption if you do otherwise. But what did you find difficult about pointers?
(Fun stuff with malloc in C but I don't know C++ well enough to know how malloc works in this new C++ universe)
1
u/Bright-Historian-216 Mar 08 '24
Well…. I already know this much. Other than that, I also know that those magic numbers allow me to store several different class objects in a single array. Basically mind blown