Unexpected behavior of std::cout following std::wcout

36 Views Asked by At

Can anyone figure out why the second output (line 5) in the following program does not print anything?

#include <iostream>
int main() {
  std::wcout << L"Hello World\n";
  std::cout << "Hello World!\n";
  return 0;
}

I used gnu c++20 version 11.4.0 and 13.1 (c++23 from Coliru).

0

There are 0 best solutions below