Haha, I don't think I should show him this thread. Maybe after I get a grade in the course =D
I'm taking an Introduction to Computer Programming course, and we started off learning C. Perhaps this is why he felt like sticking with the malloc statement. Or maybe he wanted us to further understand the concept of memory, and the size different classes require.
I'm still not sure why memcpy is bad practice (besides the fact that it's error prone and more difficult to do). Does it make the program more prone to random memory-related errors?
I have another problem though. Everything is running fine, but when the program ends, I'm getting the double free error. I'm fairly sure this is because I declared two symbolLists, and XCode is trying to free both of them. The two symbolLists share 4 identical (not in memory) SYMBOLs, and I'm getting 4 double free errors.
Here's a link to my program. I would really really appreciate it if someone could take a look at it.
https://www.yousendit.com/download/MVNlb2VBMm1OMUIzZUE9PQ
Oh, and if you guys are wondering why the hell I'm on a Mac using XCode: I learned programming by making apps for the iPhone, and I've grown pretty familiar to the XCode IDE, and its autocompletion stuff. Tried Visual Studios Express, and didn't like it too much. I'm sure if I tweaked it though it would be fine.
However, I used the malloc and memcpy statement to copy the SYMBOL, and add to the other symbolList, so I don't see why I'm getting a double free error.