Skip to content

Tag Archives: STL

In C++, Non-member buddy functions may access a class’s private members while not being members. The class definition declares them friend. Vector containers, dynamic arrays… Read More
The following are different ways to construct or initialize a vector in C++ STL 1. Initializing by pushing values one by one : C++ //… Read More
Erase-Remove-Idiom is a C++ STL (Standard Template Library) technique to remove elements from a container. It is used to remove all the elements satisfying certain… Read More
C++ algorithms are a set of pre-defined functions that can perform various operations on containers, such as arrays, vectors, and lists. These algorithms have a… Read More
Given an input matrix mat[][] of size m*m and the task is to convert the given matrix into a difference matrix of the same size… Read More
In the C++ Standard Template Library (STL), binders are a type of functors that bind or associate some of the arguments of a function to… Read More
Given a matrix arr[][] which is sorted by the increasing number of elements and a number X, the task is to find the position where… Read More
Prerequisite:  Vectors in C++ STL File Handling in C++ The C++ Standard Template Library (STL) provides several useful container classes that can be used to… Read More
The Standard Template Library (STL) is a set of C++ template classes that are used to implement widely popular algorithms and data structures such as… Read More
Functors in C++ (also known as function objects) are objects that can be treated as if they are functions. They can be called a function,… Read More
In C++, the std::bind function is a part of the Standard Template Library (STL) and it is used to bind a function or a member… Read More
Prerequisites: Functions in C++ Map in C++ Maps in C++ are a very useful data structure for storing key-value pairs. A map is the best… Read More
The C++ Standard Template Library (STL) provides a variety of useful classes and functions for working with data structures, including the  std::string class for manipulating… Read More
In C++, we have multiple options to operate over the data like in the case where we can use functions and functors. Although both seem… Read More
The C++ programming language has features like lambda expressions and binders that let you build more compact and expressive code.  To make it simpler to… Read More