更新时间:2015-12-27 22:19:51浏览次数:1+次
#include <Windows.h>
#include <tchar.h>
int main()
{
TCHAR lpString1[10] = _T("test");
TCHAR lpString2[] = _T("C++技术网");
lstrcpy(lpString1,lpString2);
MessageBox(NULL, lpString1, _T(""), MB_OK);//显示C++技术网
return 0;
}
LPTSTR lstrcpyn(LPTSTR lpString1,LPCTSTR lpString2,int iMaxLength);#include <Windows.h>
#include <tchar.h>
int main()
{
TCHAR lpString1[10] = _T("test");
TCHAR lpString2[] = _T("C++技术网");
int iMaxLength = 10;
lstrcpyn(lpString1,lpString2, iMaxLength);
MessageBox(NULL, lpString1, _T(""), MB_OK);//显示C++技术网
return 0;
}
可能有些地方描叙不准确或者理解有错误的地方,希望大家能提出来,我会好好改进的。相关资讯