Practical solutions

C++ Howtos How-To Guides

Solve the problem. Keep building. Collection of C++ how-to articles

Find the answer you need

Browse practical solutions, grouped by the task you're working on.

__COUNT__ entries on this page

How to Use the std::stod Family of Functions in C++This article introduces the std::stod family of functions in C++. Trigonometric Functions in C++This article demonstrates how to utilize trigonometric functions of STL in C++ How to Calculate Standard Deviation in C++This article shows how to calculate standard deviation in C++. Wrapper Class in C++This article talks about wrapper classes in C++. Seed Random Number Generator in C++This article discusses the seed in the random generator in C++ using the srand() and the time() functions. Is C Faster Than C++In this guide, we will see whether the C language is faster than C++ or not. How to Create a Table in C++This article discusses how to make a table in C++ using different approaches. We will discuss the setw() and setfill() methods of the iomanip library that help in proper formatting in the table. How to Remove a File in C++This article discusses how to delete or remove a file in file handling in C++. File handling is a mechanism that helps us store, retrieve, and update data in a storage device permanently. Deleting a file is one of the operations we can perform in file handling. Arrow Operator vs. Dot Operator in C++In this article, we will study the difference between the dot and the arrow operators in C++. We will also cover the basics of the dot and the arrow operators of C++ to see how they differ from each other. C++ Error ID Returned 1 Exit StatusThis article discusses the causes of the error id returned 1 exit status and how to fix this error in C++. How to Add Timed Delay in C++This tutorial will give you a brief guide on adding a timed delay in your C++ program. Comparison Between Signed and Unsigned Integer Expressions in C++C++ compilers warn making comparison between signed and unsigned integer expressions because the ranges of signed and unsigned ints vary and can deliver unexpected performance. How to Solve Expression Must Have Class Type Error in C++In this article, we will discuss the expression must have class type error in C++. We will see how the use of the dot operator causes this error to occur. We will also see how we can fix the error by using the arrow operator and by initializing the object of a class without using the new operator. How to Throw Exceptions With Message in C++The article examines C++ methods for throwing informative exceptions, offering developers effective tools to enhance error reporting in their code. How to Find Square Root Using Babylonian Method in C++In this article, we shall understand how to find the square root of an integer using the Babylonian technique in C++ programming language. Binary Search Tree Destructor in C++This tutorial will discuss creating a destructor for a binary search tree using the delete keyword in C++. How to Build a Parse Tree in C++This tutorial summarizes how to build a parse tree in C++. How to Iterate Through a Vector in C++This article introduces multiple ways to iterate over vector elements in C++. How to Iterate Through Map in C++This article demonstrates how to loop over the elements of STL map data structure. How to Find Length of an Array in C++This article demonstrates 5 different methods to calculate the length of an array; the for loop, the sizeof() function, and the array.size() function, the end(arr) - begin(arr) method, and the std::size method. How to Sleep for Milliseconds in C++This article explains ways to suspend program execution using different methods in C++ How to Determine if a String Is a Number in C++This article demonstrates multiple ways to find out whether a given string is a number in C++. How to Convert String to Int in C++This article explains how to convert a string to an integer in C++ How to Check if a File Exists in C++This article introduces several ways to check if a file exists in a directory C++