Display the value of wchar_t strings.
[kdbg.git] / kdbg / testprogs / widechar.cpp
blob20ce78e44686930c283ca81d1058f64f56971956
1 #include <wchar.h>
2 #include <stdio.h>
3 #include <string>
5 int main()
7 int j=3;
8 const wchar_t* nullPtr = 0;
9 const wchar_t* uninitializedPtr = (const wchar_t*)0xdeadbeef;
10 const wchar_t* str = L"abc";
11 wchar_t* str2 = L"def";
12 const char* shortStr = "12345";
13 wchar_t wstr[64], *wstrPtr = wstr;
15 wprintf(L"wide string: %S\n", str);
17 for (int i=0; i<j; ++i)
19 swprintf(wstr, 63, L"%d. wide string: %S\n", i+1, str);
20 wprintf(L"%S\n", wstr);