DEV Community

Discussion on: Data structures in C: Stack

Collapse
 
josethz00 profile image
José Thomaz

Hi Tony, this mixing is just a pattern that I use which consists in using pointers when you need to change some information and copies when I need to just query some data, but I am considering to use only pointers, thanks for your feedback!

And about S = NULL I am doing this to overwrite the content at this memory cell, just free is not 100% safe because you might have problems with dangling pointers: stackoverflow.com/questions/102558...