
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 7197 Articles for C++

392 Views
There are several inbuilt functions and objects to convert a number string to an integer in C++. Every method has its own advantages and disadvantages. In this article, we will discuss all the approaches to convert a number string to an integer in C++ with example code and use cases. Number String to Integer Conversion Here is the list of approaches to convert a number string to an integer in C++, which we will be discussing in this article with stepwise explanation and complete example codes. Convert Using stoi() Function ... Read More

22K+ Views
Hexadecimal is a base 16 numbering system that uses 16 digits (from 0 to 9, and then A to F) to represent numbers. It is commonly used in computing systems to represent and store data. In this article, we will learn how to convert a normal integer to a hexadecimal string using C++ program. Integer to Hex String Conversion Here is a list of approaches for converting an integer to a hexadecimal, which we will be discussing in this article with stepwise explanation and complete example codes. Using std::stringstream ... Read More

8K+ Views
A substring is a continues sequence of characters within a larger string. For example, the string "point" a substring of the string "TutorialsPoint". In this article, we will learn different approaches to check if a string contains a substring in C++. Here is a list of approaches for checking if a string contains a substring, which we will be discussing in this article with stepwise explanation and complete example codes. Using find() Using search() Using regex_search() Manual Substring ... Read More

9K+ Views
To compare two strings in C++, we can use various inbuilt functions and approaches that are already discussed in the previous sections. However, there are some cases where we need to compare two strings case-insensitively, meaning that we need to ignore the case of the characters in the strings while comparing them. In this article, we will focus on learning how to compare two strings case-insensitively in C++. Here is a list of approaches for case-insensitively string comparison, which we will be discussing in this article with stepwise explanation and complete example codes. ... Read More

3K+ Views
The string library provides several functions to manipulate and match strings. In this article, we will see how the various functions of string library functions can be used to match strings in C++. String Matching in C++ String matching is a process of locating one string in another string. Meaning, here we will find the position of a string inside another string. The string matching functions will return the position of the first occurrence of the substring in the main string. If the substring is not found, it will return a special value such as -1 or string::npos. ... Read More

478 Views
Here, we will see how to use Wagner and Fisher algorithm for string matching in C++. Using this algorithm, we can find how many minimum changes are required to match those strings. Wagner Fisher Algorithm Wagner Fisher is a dynamic programming algorithm that is used to find the minimum edit distance or levenshtein distance between two input strings. Levenshtein distance between two strings means the number of changes (ie, insertion, deletion or updation) required to convert one string into another. In simpler words, this algorithm will calculate a minimum number of changes required to convert ... Read More

5K+ Views
C++ provides multiple ways to concatenate strings. Macro string concatenation is one of such way. In this article, we will learn how to use C++ preprocessor macros to concatenate strings and tokens. Understanding Macros in C++ In C++, macros are small pieces of code that are defined using the preprocessor directive #define. Macros are generally used to define variables, constants, functions, and other code blocks. When the code is compiled, the preprocessor replaces every occurrence of the macro with its defined value before actual compilation begins. Let's see an example of a macro definition and its usage. // ... Read More

4K+ Views
The Depth-First Search (DFS) is a graph traversal algorithm that starts at root node and explores as far as possible along each branch before moving to next branch. In this article, we will discuss how to check the connectivity of a graph using DFS traversal algorithm. Understanding Connectivity of a Graph A graph is said to be connected if there is a path between every pair of vertices. To check connectivity of a graph, we will try to traverse all nodes using any traversal algorithm. After completing the traversal, if there is any node, which is not visited, then ... Read More

812 Views
The Breadth-First Search (BFS) algorithm is a graph traversal algorithm that starts at the tree root and explores all nodes at the present depth before moving to the nodes at the next level. In this article, we will discuss how to check the connectivity of a directed graph using BFS traversal algorithm. Understanding Connectivity of a Graph A graph is said to be connected if there is a path between every pair of vertices. To check connectivity of a graph, we will try to traverse all nodes using any traversal algorithm. After completing the traversal, if there is any ... Read More

1K+ Views
The Breadth-First Search (BFS) algorithm is a graph traversal algorithm that starts at the tree root and explores all nodes at the present depth before moving to the nodes at the next level. In this article, we will discuss how to check the connectivity of a graph using BFS traversal algorithm. Understanding Connectivity of a Graph A graph is said to be connected if there is a path between every pair of vertices. To check connectivity of a graph, we will try to traverse all nodes using any traversal algorithm. After completing the traversal, if there is any ... Read More