C++11 : std::tuple Tutorial & Examples
In this article we will discuss what is std::tuple and how to use it.
C++11 : std::tuple Tutorial & Examples Read More »
In this article we will discuss what is std::tuple and how to use it.
C++11 : std::tuple Tutorial & Examples Read More »
In this article, we will look into a Smart Pointer unique_ptr in C++. It provides an easier way of memory management. Smart pointers are an integral part of modern C++ as they help prevent memory leaks and ensure that memory is managed automatically. What is a unique_ptr? A unique_ptr is a type of smart pointer
What is unique_ptr in C++? Read More »
In this example we will discuss c++11 std::packaged_task feature and its uses.
C++11 Multithreading – Part 10: packaged_task Example and Tutorial Read More »
In this article we will discuss different ways to convert double to String or char array with or without precision i.e. double to String using C++11’s std::to_string std::to_string is introduced in c++11. Example to convert double to std::string using to_string is as follows, double num = 6789898989.33999443; //Converting using std::to_string std::string str = std::to_string(num); Output:
C++ : Convert double to string and manage precision | scientific notation Read More »
In this article we will discuss different ways to remove elements from HashMap while Iterating.
Java : How to Remove elements from HashMap while Iterating Read More »
In this article, we will discuss how to capture member variables from the outer scope. Wrong way to capture member variable in Lambda — Compile Error Suppose we have a class OddCounter to keep track of the odd numbers read by the object. Inside its member function, we are creating a lambda function and passing
How to Capture Member Variables in Lambda function in C++? Read More »
Lambda Functions were introduced in C++11, and it allows us to write Inline, Anonymous Functions. Lambda Functions are also called Lambda Expressions. These Lambda expressions/functions are particularly useful when you need to pass a small function as an argument to another function as callbacks, such as a sorting algorithm or a thread constructor. In this
C++11 Lambda: Capture Variables by Reference or Value Read More »
In this example we will discuss different ways to sort a std::list of user defined data types with custom comparators or lambda functions.
C++ : How to Sort a List of objects with custom Comparator or lambda function Read More »
In this article we will discuss different ways to iterate through std::list of objects.
C++ : Different Ways to iterate over a List of objects Read More »
In this article we will discuss different ways to find or search a given element in the list.
C++ List – Find | Contains : How to search an element in std::list ? Read More »