1

Can someone explain to me what is wide character string and how to use them with examples. For example:

std::cout<<L"\115";

Why do I get 0x100000f90 as output instead of M when I just use

std::cout<<"\115";
BVBC
  • 375
  • 2
  • 4
  • 11
  • see: http://stackoverflow.com/questions/11107608/whats-wrong-with-c-wchar-t-and-wstrings-what-are-some-alternatives-to-wide – NathanOliver May 20 '15 at 15:22
  • wchar should be sent to wcout. http://stackoverflow.com/questions/2493785/how-i-can-print-the-wchar-t-values-to-console – timato May 20 '15 at 15:23

1 Answers1

2

To answer the second part of your question if you want to output wide characters then you need to use std::wcout

NathanOliver
  • 171,901
  • 28
  • 288
  • 402