Код: Выделить всё
Frequency my_frequency{200.12345};
fmt::print("{}", my_frequency); // Returns "200.12345 Hz" (or whatever the exact floating point representation is on that machine)
// Here is what I'm trying to achieve but is not working
fmt::print("{:.2f}", my_frequency); // Should print "200.12 Hz"
fmt::print("{:
Подробнее здесь: [url]https://stackoverflow.com/questions/79723604/how-to-format-types-with-suffices-in-libfmt[/url]