实现代码例如以下:
/*************************************************************************
> File Name: testString.h
> Author: qiaozp
> Mail: qiaozongpeng@163.com
> Created Time: 2014-9-30 11:21:15
************************************************************************/
#include <iostream>
#include <string.h>
using namespace std;
//实现字符串拷贝
char* _strcpy(char* src, char* dst)
{
if (src == NULL)
{
return NULL;
}
char* tmp = src;
int i = 0;
while (*tmp)
{
dst[i++] = *(tmp++);
}
dst[i] = '