From Jason Turner
Watch on YouTube

Summary

This episode presents a concise overview of the best approaches for printing output in C++23. Jason recommends using puts() for simple null-terminated strings with a newline, as it's fast and clean. For formatted output, he suggests using the {fmt} library when external dependencies are allowed, or std::print/std::println from C++23's header when they're not. He notes that these modern options are type-checked, easier to use, and avoid common arguments about endl usage that plague iostream-based approaches.

Resources

Tags