Deine Mutter Expert Cheater Reputation: 1 Joined: 05 Apr 2006 Posts: 181
|
Posted: Mon Apr 24, 2017 2:56 am Post subject: |
|
|
fmanager wrote: | But what's the different between TCHAR, char, WCHAR, wchar_t?.... It's confusing.... |
TCHAR is a macro which resolves to wchar_t if you compile with Unicode, otherwise it resolves to char.
An example which demonstrates this:
Code: | $ type test.c
#include <stdio.h>
#include <windows.h>
void main()
{
printf("%zu\n", sizeof(TCHAR));
}
$ cl test.c /Fe:no_unicode.exe
[...]
$ cl test.c /DUNICODE /D_UNICODE /Fe:unicode.exe
[...]
$ no_unicode.exe
1
$ unicode.exe
2 |
The idea is that TCHAR makes your code independent of the charset that it is compiled with. So adding/removing Unicode support is just a matter of modifying compilation flags instead of changing the code. _________________ [DELPHI] PCheckers - Checkers Bot for playray.de
[C#] Playray Pool Hack/Cheat/Bot (PPaim - Playray Pool Aimer)
|
|