Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

3
  • My answer uses strcpy. I am looking for why my answer solves my problem. I believe it has something to do with pointers and allocation. 'My answer' is posted as a literal stack overflow answer. Commented Jun 26, 2012 at 16:24
  • I'm trying to answer that question but you left the critical part (the design of the employee structure) out. Your answer also implies that the fix came from re-arranging the scope of the memory allocations ("When I place the declaration and allocation of secondList in main() and put the rest in a function it works"). Commented Jun 26, 2012 at 16:59
  • Okay, the format of the structure you have makes the problem more clear. Commented Jun 26, 2012 at 17:19