Posts from C++

How to turn off a particular bit in a number in C++ ?

By Abhishek Sharma

In this tutorial, we will see how to turn off a particular bit in a number in C++. Any number can be represented in its binary form which contains 0s and 1s. And we want to convert.... Read More

_Find_next() function in C++ bitset

By Abhishek Sharma

Hello there! In this tutorial, you will learn about working of _Find_next() which is a built-in function of the bitset class. First, let us see what is a bitset. A Bitset stores bi.... Read More

Return array from function by reference in C++

By Harsh Singh

Here we will learn how to return an array by reference from a function in C++. We can achieve this in multiple ways. Let’s check these out: First Method: by creating the arra.... Read More

The difference between push_back and insert in C++

By HARI HARAN B

The push_back and insert functions insert elements into many STL containers like the vector, list, and deque. In this article, we will compare the differences between the two with .... Read More

How to delete files less than specific size in C++

By Harsh Singh

In this article, we will learn how to delete files that are less than a given specific size from a directory in C++. We will follow the following steps for this – Open the di.... Read More

Color text output in Console in C++

By YANNAM SATYA AMRUTHA

In general, when we execute any program in C++ we observe that the output text is in white color on black background. But in C++, we can change the color of the text on the console.... Read More

How to delete empty files from a directory in C++

By Paras Bhargava

Here in this tutorial, we are going to learn how to delete empty files from a directory in C++. The <filesystem> library in C++ 17 provides a very powerful method to iterate .... Read More

Pop last element of a vector in C++

By YANNAM SATYA AMRUTHA

In this article, we will discuss how we can pop the last element of a vector and reduce its size by one. Before getting into the topic, let’s discuss what are vectors and the.... Read More