课程: C++ Development: Advanced Concepts, Lambda Expressions, and Best Practices
今天就学习课程吧!
今天就开通帐号,24,100 门业界名师课程任您挑!
The format library - C++教程
课程: C++ Development: Advanced Concepts, Lambda Expressions, and Best Practices
The format library
- [Instructor] C++ 20 introduces the new format library which returns a formatted representation of its arguments as a string. The new formatter uses a Python style formatting string with concise syntax, type safety and excellent performance. This is format .CPP from chapter eight. Of the exercise files, we're including the format header which has the format library also IO stream, string view and numbers. And you'll notice from the numbers library we're using the value pi. We'll also be using Cout and the format function in this example. And we have a template class for a fraction with enumerator and a denominator. We'll get to that a little bit later. We also have our format style print function which we've been using throughout this course. This uses the new formatter and it uses this V format function to take the arguments and turn them into a string that can be output by outputs. In this case, which is a very very…
随堂练习,边学边练
下载课堂讲义。学练结合,紧跟进度,轻松巩固知识。