PhantomBeaker wrote: Hey, Just a very quick question. I'm doing some stuff in C, and I'm currently muddling my way through this (i.e. learning as I go, and gleaning of as many tutorials as I can find). The thing is, the tutorials aren't answering one pretty big question for me. How do I drop a structure once I'm finished with it? Do I just call free(whatever) ? Also, if I'm doing this in C++, and still using structs for some odd reason (like I'm working on a project with mixed code, and I'm using a function that returns a struct) could I also use delete, or would it be best to stick with free or some other solution? Thanks, Aoife
rmacm wrote: Torak structs and classes are not the same thing. Structs are data structures well at least as far as we were shown in college. Structs don't contain any methods on the data they contain which would make them different to classes. Cheers Rory
Stroustrup wrote: struct - class with members public by default. Most often used for data structures without member functions or class invariants, as in C-style programming. TC++PL 5.7, 10.2.8, D&E 3.5.1.
Smellyirishman wrote: That's basically what rmacm said.