16,548
社区成员




#include "stdafx.h"
#include <windows.h>
#include <stdio.h>
#include <strsafe.h>
void main()
{
WCHAR stra[20] = {'A','B','C', 'D'};
LPWSTR pstrb = L"abc";
StringCbCatW(stra, sizeof(stra), pstrb);
wprintf( L"string after cat: %s\n", stra );
}
#define UNICODE
#define _UNICODE
#include<typeinfo.h>
#include<windows.h>
#include<tchar.h>
#include<stdio.h>
int main()
{
printf("%s\n",typeid(TCHAR).name());
TCHAR stra[20];
LPTSTR pstrb = NULL;
stra[0] = TEXT('A');
stra[1] = TEXT('B');
stra[2] = TEXT('C');
stra[3] = TEXT('D');
stra[4] = TEXT('\0');
pstrb = TEXT("abc");
lstrcat(stra, pstrb);
_tprintf(TEXT("string after cat: %s\n"), stra);
return 0;
}