更に_MBCSが定義されているかどうかという第3の状態が存在します。これが定義されていればマルチバイト文字、そうでなければシングルバイト文字を使用するということになります。 次のプログラムではその違いが現れます。_tcschrはstrchr/_mbschr/wcschrの3種類に展開されます。 //test.cpp //VC++ 8 cl /EHsc test.cpp #include <stdio.h> #include <string.h> #include <tchar.h> int main(void) { const _TCHAR* p = _tcschr(_T("ア"), _T('A')); if (p != 0) _tprintf(_T("p == '%c'\n"), *p); else _tprintf(_T("not found\n")); return 0; } このま
![TCHAR (3) <tchar.h> - イグトランスの頭の中](https://cdn-ak-scissors.b.st-hatena.com/image/square/a7274223b85fd3a3d63aa92bdf57c610d6bc7a84/height=288;version=1;width=512/https%3A%2F%2Fdev.activebasic.com%2Fegtra2nd%2Fegtra.png)