The below post is completely off topic and only meant to be a small disclaimer.
I want the OP and any other beginner that comes here to realize strcpy can be unsafe, if not used properly.
(See here for a definition of buffer overflow error: http://www.cs.wright.edu/~pmateti/InternetSecurity/Lectures/BufferOverflow/ )
A word of caution to anyone who uses strcpy, it is an unbounded string function. It could be susceptible to overflow and buffer attacks.
Functions that have a length bound are safer.
For example: http://www.cplusplus.com/reference/string/string/copy/