You need to allocate memory for the destination.  strcpy just copies
bytes from one location to another -- *both* must be valid memory
locations and may not overlap (undefined behavior).

Go to comp.lang.c *and* read the FAQ.

-- 
Eric G. Miller <egm2@jps.net>

Reply via email to