Move type inference from parse time to display time.
[kdbg.git] / kdbg / testprogs / widechar.cpp
blobae0725a26d48478405c2c1616a2d8c7b9ed1979b
1 #include <wchar.h>
2 #include <stdio.h>
3 #include <string>
5 struct WChar {
6 const wchar_t* cwstr;
7 wchar_t* wstr;
8 };
10 int main()
12 int j=3;
13 const wchar_t* nullPtr = 0;
14 const wchar_t* uninitializedPtr = (const wchar_t*)0xdeadbeef;
15 const wchar_t* str = L"abc";
16 wchar_t* str2 = L"def";
17 const char* shortStr = "12345";
19 WChar s = { 0, L"Some string" };
20 s.cwstr = s.wstr;
22 wchar_t wstr[64], *wstrPtr = wstr;
24 wprintf(L"wide string: %S\n", str);
26 for (int i=0; i<j; ++i)
28 swprintf(wstr, 63, L"%d. wide string: %S\n", i+1, str);
29 wprintf(L"%S\n", wstr);