/***
*char *strcpy(dst, src) - copy one string over another
*
*Purpose:
* Copies the string src into the spot specified by
* dest; assumes enough room.
*
*Entry:
* char * dst - string over which "src" is to be copied
* const char * src - string to be copied over "dst"
*
*Exit:
* The address of "dst"
*
*Exceptions:
*******************************************************************************/
char * __cdecl strcpy(char * dst, const char * src)
{
char * cp = dst;
while( *cp++ = *src++ )
; /* Copy src over dst */
return( dst );
}
int _tmain(int argc, _TCHAR* argv[])
{
char* src = "abc";
char* dest = (char*)malloc(strlen(src)+1);
memset(dest, 0x00, sizeof(strlen(src)+1));
dest = strcpy(dest, src);
free(dest);
dest = NULL;
return 0;
}