B 11 tutorial: In the previous article, we have discussed about Need of Operator Overloading in C++ ?. Let us learn Tutorial for Beginners & Professionals in C++ Program.
C++ developers who are yet to switch to C++11 advanced language can gain full knowledge about CPP11 language by continuing your read till the end of this tutorial. BTech Geeks free online C++11 Tutorial and Resources help beginners or software developers or professionals holding great & quality knowledge regarding the core concepts of C++11. Keep your look at the available links to start C++11 learnings quickly and program with ease.
- List of concepts covered in C++11 Tutorial
- What is C++11?
- History of C++11 Language
- New Changes in C++11
- Major & Updated Features of CPP11
- C++11 Programming Language Goals
- Principles of C++11
- List of Core to Advanced C++11 Interview Questions
List of concepts covered in C++11 Tutorial
What is c++11: The topics which are covered from basic level to advanced level available here in this list. We have collected all these tutorials in one place for your quick reference at the time of examinations or interviews or while programming. Let’s dive into this tutorial without any further delay.
C++11 Utilities
- Deleting Functions using ‘delete’ keyword
- std::bind
- auto specifier
- Variadic Templates
C++11 : Lambdas
- C++11 Lambda Function : Example & Tutorial
- C++11 Lambda : Capturing local variables
- C++11 Lambda : Capturing Member Variables
C++11 Multithreading
- Part 1: Three Ways to Create Threads
- Part 2: Joining and Detaching Threads
- Part 3: Passing Arguments to Threads
- Part 4 : Sharing Data & Race Conditions
- Part 5 : Fixing Race Conditions using mutex
- Part 6 : Need of Event Handling
- Part 7: Condition Variables
- Part 8: std::future and std::promise
- Part 9: std::async Tutorial & Example
- Part 10: std::packaged_task<> Tutorial
C++11 Thread FAQ
- C++11 : Start thread by member function
- C++11 : How to put a thread to sleep
- C++11 : How to get a Thread ID ?
- C++11: Vector of Thread Objects
- C++11 : std::thread as a member variable in class
- C++11 : How to Stop a Thread
C++11: Threads Video course
- Modern C++ Concurrency in Depth
C++11 Rvalue References
- lvalue vs rvalue
- Is rvalue immutable in C++?
- What is rvalue reference in C++11
- Move Contsructor
C++11 std::initializer_list
- std::initializer_list Tutorial
- initializer_list and Constructors
- Initialize a map with initialzer_list
C++11 : New STL Algorithms
- c++11 – std::all_of()
- c++11 – std::any_of()
C++11 std::array
C++11 Callbacks
- Function Pointers
- Function Objects & Functors
Top C++11 / C++14 Courses & Books
- Top C++11 / C++14 / C++17 Courses
- C++11 Tutorial
C++11 Tuples
- c++11 : std::tuple Tutorial
- c++11 : std::make_tuple Tutorial
C++11 Smart Pointers
- shared_ptr<> Tutorial and Examples
- shared_ptr and Custom Deletor
- shared_ptr vs raw pointer
- Create shared_ptr objects carefully
- weak_ptr Tutorial | shared_ptr and Cyclic References
- unique_ptr<> Tutorial and Examples
C++11 Unordered Map
- Basic Usage Detail and Example
- Initializing an unordered_map
- Searching in unordered_map
- Insert elements in unordered_map
- Erasing an element
- Erase elements while iterating
- std::map vs std::unordered_map
C++11 Unordered Set
- 1.) unordered_set Basic Example
- 2.) Initializing an unordered_set
- 3.) Inserting elements in an unordered_set
- 4.) Searching an element in unordered_set
- 5.) unordered_set – Custom Hasher & Comparator
- 6.) Unordered_set & User defined classes
C++17: Filesystem Library
- Check if given path is a file or directory
- Get the list of all files in a directory
- Extract file extension from a path string
- How to get filename from a path
C++11: String Examples
- Find and Replace all occurrences of a string
- Find all occurrences of a sub string
- Case Insensitive string::find
- Convert First Letter of each word to Upper Case
- Converting a String to Upper & Lower Case
- Trim strings in C++
- C++ : How to split a string using String and character as Delimiter?
- startsWith() Implementation
- endsWith() Implementation
- Remove Sub Strings from String
C++11 / Boost – date Time Library
- C++ Date class Tutorial
- Add / Subtract Days from a Date
- Convert String to Date Object
- Difference between 2 Dates
- Get Current Date & Time in C++
What is C++11?
C++11 features: C++11 is a new version of C++ which includes completely a new set of features to the c++ language. Also, you can call as ‘C++0x’ that covers different techniques to the core language and extends the standard library of C++. Also, it includes mostly the C++ Technical Report 1 (TR1) libraries.
History of C++11 Language
In the year of 2011, C++11 got approved and it is also a second C++ standard. There are many crucial improvements in both the C++11 language and its library as a result, the TR1 extensions are turned out to be done within the framework of the namespace standard. After that, the certified title again is specified as “Information Technology – with Programming Languages – C++”, however, it is initialized with a new document number ie., ISO/IEC 14882:2011.
New Changes in C++11
- You can discover many enhancements on readability, speed, and high-level programming constructs
- New C++11 standard substitutes C++98
Do Refer: C++ Programming Tutorial for Beginners
Major & Updated Features of CPP11
For your better learnings, we have listed some of the new & updated features of C++11 which are very important to learn while programming. Check out the list of newly added features of C++11 Programming Language and get a good grip on the latest knowledge.
- Compile-time initialization with constexpr
- Important Minor Syntax Cleanups
- Uniform Initialization and Initializer Lists
- nullptr constant
- Type inference with auto and decltype
- Automatic Type Deduction using auto
- Trailing return types
- rvalue references
- Range-based for loops
- Aliases with a superset of typedef
- Lambda Expressions
- static-assert
- Variadic templates
C++11 Programming Language Goals
The originator of C++, Bjarne Stroustrup defined the C++11 goals and they are as follows:
- To create & build C++ simpler to learn, use, and teach.
- Provide functionality that performs the language more compatible and easier to do.
- It is created on C++’s strengths instead of trying to extend C++ to new areas where it may be more ineffective (eg. Windows applications with heavy GUI).
- Concentration on performing what it does well makes it even better.
Principles of C++11
By considering the above goals of C++11, the committee that placed the language collectively decided to heed the below general principles:
- Concentrate on developing abstraction mechanisms (classes, templates) instead of adding mechanisms to manage specific, narrow situations.
- Control stability and compatibility with older versions of C++ and C at possible places. Programs & Applications that served under C++03 should usually yet work under C++11.
- Put the number of core language extensions to least, and keep the majority of the variations in the standard library.
- Basically, C++11 isn’t a huge departure from C++03, yet it did add a large amount of new functionality.
- Boom Type safety, to stop inadvertent faults.
- Enhance performance and let C++ work directly with the hardware.
List of Core to Advanced C++11 Interview Questions
Here is the list of a few basic to advanced Interview Questions on C++11 that helps beginners and freshers to learn and attempt job interviews efficiently.
- What do you mean by C++11?
- Explain new features of C++11?
- What do you understand from the lexical analysis?
- What do you mean by a Move Constructor?
- Which keyword in C++ 11 is used to prevent a virtual function from being overridden?
- C++ 11 introduces a new keyword. Find out that keyword.
- In C++11 which data type is newly introduced among these?
- What is the correct syntax for lambda expression in C++11?
- Does the below code compile successfully on C++11?
class C { int a=7; public: C(); };
- Write the syntax to use C++11 features while compilation?