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
(3) for container traversal
(4) lambda expression
Use lambda expression The formula counts the number of strings and the number of uppercase letters
(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
## (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(7) move constructor
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!