Hi there,
I want to know about wchar_t data type i.e. how it is used and why we use it. And also what is the difference between char and wchar_t. One last thing why we write L before wchar_t initialization.
#include <iostream.h>
void main()
{
wchar_t w;
w = L'A';
cout << "Wide character value::" << w << '\n';
cout << "Size of the wide char is::" << sizeof(w);
}
When I output hello in wchar_t it shows 111. What is the logic behind this. Thanks !