티스토리 뷰
// Dynamic Memory Allocation : TCHAR *myString
#include <tchar.h>
#include <windows.h>
#include <cstdio>
#include <cstring>
int _tmain()
{
TCHAR *myString;
myString = new TCHAR[8];
//_stprintf(myString, _T("%s"), _T("1234567"));
wsprintf(myString, _T("%s"), _T("1234567"));
_tprintf(_T("String : %s \n"), myString);
_tprintf(_T("Length : %d \n"), _tcslen(myString));
delete[] myString;
return 0;
}
'Piece' 카테고리의 다른 글
[SQL Server] Enable TCP/IP Protocol & Port (0) | 2018.07.09 |
---|---|
[Visual Studio] Dynamic/Static Library Setup Example using MySQL Connector/C++ (0) | 2018.07.09 |
[C#] iterating enum type (0) | 2018.07.09 |
[Windows] Set %HOME% Environment Variable (for Vim, Emacs, AStyle, ...) (0) | 2018.07.02 |
[C/C++] Predefined Macros (0) | 2018.06.30 |