C++
- 11 June
Merge two Vectors in C++
vectors are like dynamic arrays and they can be resized when an element is added or deleted. Their storage is handled automatically by the container. C++ allows multiple features which can help in merging two vectors efficiently. In this article, we will discuss six different ways to merge two vectors in C++. Using merge() to […]
- 11 June
Generate Random Number Between 0 and 1 in C++
1. Introduction Generating random numbers within a specific range is a common task in C++ programming. The requirement often involves creating random integers or floating-point numbers within a range, like 1 to 10. This article will explore various methods to generate random numbers between 0 and 1(inclusive and exclusive both) The numbers generated are fractions, […]
- 07 June
Check if string contains substring in C++
There are different ways to check if string contains substring in C++. Library functions are available in C++ like find() and strstr() to find the substring in a string. In this article, we will discuss multiple methods to check if a string contains a substring in C++. Using find() function to check if string contains […]
- 24 May
Convert float to String in C++
Learn about how to convert float to String in C++ in different wayds.
- 18 May
Vector of structs in C++
In this article, we will see how to initialize and use vector of structs in C++. There are different ways to do it. This article will explain these methods clearly. Using Range Constructor We can utilize the range constructor for the initialization of vector of structs in C++. It is useful when we need to […]
- 18 May
Convert int to Char Array in C++
There are different ways to convert int to char array in C++ that we will explain in this article. Using to_string and c_str methods to convert int to Char Array in C++ In this method, we will first convert the number to a string by utilizing the to_string method in C++. Then we use the […]