malloc(): memory corruption
When you look at an error message like that, what could possibly lead you to believe that, a hundred lines up, you didn't properly initialize a size variable? After all, all we know is that this malloc() operation could not complete because the memory it should be able to touch is corrupted.
How many times have I seen this pattern in object oriented code?
All members of the class are private
All members can be accessed with accessor functions
All members can be changed with modifier functions
I hate to break it to y'all, but that's just a struct. The only thing you've done is add a hundred lines
This will be a bit of a longer section, because I couldn't think of a fun way to write the code otherwise. Bonus!
A structure is a data element defined by the programmer which contains several member data elements. We define these structures to allow ourselves to handle a set of related data much more
If we're being honest, we don't start programming because we want to print out clever one-liners to a terminal. We want to calculate something complicated or massive, and we want to do it quickly.
Variables, functions, and symbols
We all know what a number is, right? We may behind many countries in mathematics and science, but