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*

9
  • 6
    If you run this in the debugger, you will learn which line causes the error. Commented Jun 23, 2012 at 22:33
  • @CodeKingPlusPlus: emp->name = "Dan";???? Shouldn't it be strcpy(emp->name, "Dan")? Commented Jun 23, 2012 at 22:35
  • 1
    @Oli Charlesworth: Ted? A guaranteed "Exercise in Poor Taste" ;) Commented Jun 23, 2012 at 22:38
  • @Oli Charlesworth good suggestion with the strcpy... I will never be entirely used to C... Commented Jun 24, 2012 at 0:57
  • 3
    "Shouldn't it be strcpy(emp->name, "Dan")? " -- only if you're intent on writing into unallocated memory. Commented Jun 24, 2012 at 9:45