Posts from C++

Round up to nearest power of 2 in C++

By Mahak Chawla

In this tutorial, we will learn how to round off a given number to the nearest power of 2 in C++. For example, Input: n= 19 Output: 16 There can be two cases. The power of 2 can be.... Read More

How to terminate program in C++

By Karandeep Singh

Hey, guys… Today we are going to learn how to terminate a program in C++. We can terminate a program in C++ in different methods that are listed below: By using exit() functi.... Read More

timezone converter in C++

By Karandeep Singh

Hey, guys today we are going to learn how to create a timezone converter in C++ using built-in functions only. Before starting with the code one should have basic knowledge of time.... Read More

C++ program to calculate the area of kite

By Karandeep Singh

Hey, guys today we are going to learn how to write a program to calculate the area of a kite. Before starting with the program, let us study the shape of the kite. Kite is a two-di.... Read More

C++ program to construct an expression tree

By Abhishek Sharma

In this tutorial, we will see how to construct an expression tree in C++. We will construct the tree from a given string of postfix expression. But first, let’s see what is a.... Read More

Difference between std::bind() and boost::bind() in C++

By Abhishek Sharma

If you are searching for the difference between std:: bind() and boost:: bind() you have come at the right place. Here in this article, I will provide you with the differences so t.... Read More

Read a line with delimiter until the end of each line in C++

By Abhishek Sharma

Learn how to read a line with delimiter until the end of each line in C++ with examples. In this tutorial, you will see how to read a line using a delimiter. A delimiter specifies .... Read More

Take user input in map in C++

By Mahak Chawla

In this tutorial, we will learn how to take input from the user in a map in C++. Maps in C++ are container structures that store elements in key-value pairs. For every unique ke.... Read More

Related Posts