ESP8266 and cout

Hi,
why this:
cout << F("CPU Frequency: ") << ESP.getCpuFreqMHz() << F(" MHz") << endl;
expression does not work?
I get this result:
CPU Frequency: P MHz

By the way, this expression:
Serial.printf("CPU Frequency: %i MHz\n", ESP.getCpuFreqMHz());
works fine!

Thanks Chris

because you are on Arduino
for << on strings you could use a library
~~https://github.com/tttapa/Arduino-PrintStream~~
sorry

Juraj:
because you are on Arduino
for << on strings you could use a library
GitHub - tttapa/Arduino-PrintStream: A simple library, that adds `std::cout`-like support for the Arduino (using the `<<`-operator).

You missed the point. << is already working, the question is why the CPU frequency shows as "P".
The answer is that ESP.getCpuFreqMHz() returns uint8_t which is printed as a character. Cast it to a larger integer type, e.g.

  cout << F("CPU Frequency: ") << (uint32_t)ESP.getCpuFreqMHz() << F(" MHz") << endl;