Home>Article>Backend Development> What are the new features of C++ 11?
C 11 new features: 1. auto; 2. nullptr; 3. for; 4. lambda expression; 5. override, final; 6. rvalue reference; 7. move constructor; 8. container initialization.

C 11 new features:
(1) auto
Use auto to add any two numbers

(2) nullptr null pointer
![What are the new features of C++ 11?[1] What are the new features of C++ 11?[1]](http://m.sbmmt.com/img/upload/article/000/000/052/d0aaa880fb2984dcd5adcca1085a9585-1.png)
(3) for container traversal
![What are the new features of C++ 11?[2] What are the new features of C++ 11?[2]](http://m.sbmmt.com/img/upload/article/000/000/052/678098862138bca754da2871de96061f-2.png)
(4) lambda expression
Use lambda expression The formula counts the number of strings and the number of uppercase letters
![What are the new features of C++ 11?[3] What are the new features of C++ 11?[3]](http://m.sbmmt.com/img/upload/article/000/000/052/678098862138bca754da2871de96061f-3.png)
(5) override, final
Override means rewriting the base The virtual function of the class
final means that overriding the base class virtual function is prohibited
![What are the new features of C++ 11?[4] What are the new features of C++ 11?[4]](http://m.sbmmt.com/img/upload/article/000/000/052/678098862138bca754da2871de96061f-4.png)
## (6) Rvalue reference
lvalue: points to a stable memory space lvalue means Location, addressing means rvalue: points to a temporary memory space rvalue means read, read-only means![What are the new features of C++ 11?[5] What are the new features of C++ 11?[5]](http://m.sbmmt.com/img/upload/article/000/000/052/678098862138bca754da2871de96061f-5.png)
(7) move constructor
![What are the new features of C++ 11?[6] What are the new features of C++ 11?[6]](http://m.sbmmt.com/img/upload/article/000/000/052/e9c5570e5668fa073e662d5dcb083282-6.png)
Related learning recommendations:
The above is the detailed content of What are the new features of C++ 11?. For more information, please follow other related articles on the PHP Chinese website!