#include
#include
using namespace std;
int main()
{
wcout << L\"Hello\"; // OK.
wcout << wstring(L\"He
For the first one, I'm guessing this overload is used:
template< class CharT, class Traits >
basic_ostream& operator<<( basic_ostream& os,
const char* s );
Where wstream is essentially a basic_ostream.
For why string("Hello") doesn't work, it's simply because there is no conversion from string to wstring, nor an overload of operator<< provided.