C++ iostream wclog Object
Example
Use the wclog object to output a log message:
int myNum = 12;
wclog << L"The number " << myNum << L" was given\n";
Definition and Usage
The wclog object is used to output log messages (information about what the program does) with wide characters. It works like clog, but it outputs wchar_t data instead of char data.
A wide character (wchar_t) is a character type that can store more different characters than char. Wide text is written with an L in front, like L"Hello".
The wclog object is defined in the <iostream> header file.
Note: To avoid problems, do not mix wide and normal streams in one program. Use wclog together with wcout, and clog together with cout.
Syntax
wclog << value;
Parameter Values
| Parameter | Description |
|---|---|
| value | Required. The value to output, like wide text (L"text"), a number, or a wchar_t character. |
Technical Details
| Returns: | The << operator returns a reference to wclog itself, so you can use << many times in one statement. |
|---|