unordered_map operator= in C++ STL
The ‘=’ is an operator in C++ STL which copies (or moves) an unordered_map to another unordered_map and unordered_map::operator= is the corresponding operator function. There are three versions of this function....
read more
Number of ordered points pair satisfying line equation
Given an array of n integers, slope of a line i. e., m and the intercept of the line i.e c, Count the number of ordered pairs(i, j) of points where i ? j, such that point (Ai, Aj) satisfies the line formed with given slope and intercept....
read more
Important functions of STL Components in C++
...
read more
Reverse substrings between each pair of parenthesis
Given a string str that consists of lowercase English letters and brackets. The task is to reverse the substrings in each pair of matching parentheses, starting from the innermost one. The result should not contain any brackets....
read more
Iterative Boundary Traversal of Complete Binary tree
Given a complete binary tree, traverse it such that all the boundary nodes are visited in Anti-Clockwise order starting from the root....
read more
How to detect Stack Unwinding in a Destructor in C++?
Stack unwinding is the process of executing destructors for all local objects when an exception propagates out of a function. It happens when an exception is thrown and not caught within the same function. When this occurs, the destructors for all objects with automatic storage duration declared in that function are called in reverse order of their declaration before the control is transferred to a handler (if any) or returned to the caller....
read more
Get Map Element at Offset in C++ STL
Prerequisites: Map in C++ STL...
read more
vTable And vPtr in C++
In C++, runtime polymorphism is realized using virtual functions. But have you ever wondered how virtual functions work behind the scenes? The C++ language uses Vtable and Vptr to manage virtual functions. In this article, we will understand the concepts of Vtable and Vptr in C++....
read more
Which data structure is used by Map?
What is a Map?...
read more
Debugging in Turbo C++
Debugging is a process in which the programmers detect and remove the existing or potential errors/bugs in their programs. It is an excellent practice for writing an effective code. Now, Turbo C++ provides a variety of useful features for the sake of its community. Some options that play an important role in our debugging are Watch and Trace. Let’s understand these concepts by taking the following program:...
read more
ATM using file handling in C++
In this article, the task is to implement an ATM with functions like add, delete, search, and update users using file handling in C++....
read more
Preprocessor output of cpp file
Preprocessing is a stage where preprocessor directives are expanded or processed before source code is sent to the compiler. The most common example of such directive is #include or #define. A preprocessor output has “.i” extension....
read more