Posts from C++

How to check whether a vector is empty or not in C++

By Sharath S

In this post, I will try to explain every possible way in which you can check whether a vector in C++ is empty or not. So there are two primary methods to check the emptiness of a .... Read More

Methods to resize a 2D vector in C++

By Raj Anand

In this tutorial, I’ll explain how to resize a 2D vector in C++ with some easy examples and code snippets. Before starting this let’s understand how to initialize a 2D .... Read More

Difference between .cc and .cpp file

By Bhushan Patil

In this tutorial, we will see the difference between the .cc and .cpp file extensions but first, we need to know what exactly .cc and .cpp is ? Actually, there is no difference at .... Read More

How to initialize a map in C++

By Bhushan Patil

In this tutorial, we will see how to initialize a map in C++. So, a Map is part of the Standard template library (STL), STL map is an associative container that stores elements in .... Read More

Understanding constexpr specifier in C++

By Vidhi Jain

Let’s discuss constexpr specifier in C++. We use them to evaluate the value of the functions and variables at compile-time, and hence we save time at run time. The expression.... Read More

list::splice in C++ with examples

By Vidhi Jain

Here we will learn about the function list::splice in C++, which is used to transfer elements from one list to another. list::splice is an inbuilt function in the Standard temporar.... Read More

Quickly find multiple left rotations of an array using C++

By Vidhi Jain

The multiple left rotations mean rotating an array n number of times. For eg: array: 1,2,3,4,5 rotating 3 times: 4 5 1 2 3 C++ Code for multiple left rotations For having multiple .... Read More

boost is_pointer template in C++

By Vidhi Jain

Let’s talk about boost is_pointer in C++. The is_pointer template of the boost library. It tells if the given type is a pointer or not. It returns the value in boolean. Heade.... Read More