Hardcoding a Unicode String - C++ Data Type

C++ examples for Data Type:string

Description

Hardcoding a Unicode String

Demo Code

#include <iostream>
#include <fstream>
#include <string>

using namespace std;

int main() {//from www.  j  a  va2s.co m
   wstring ws1 = L"Infinity: \u221E";
   wstring ws2 = L"Euro: _";

   wchar_t w[] = L"Infinity: \u221E";

   wofstream out("tmp\\unicode.txt");
   out << ws2 << endl;
   wcout << ws2 << endl;
}

Related Tutorials