Posts by Harsh Singh

Author Biographical Info: Not available

Vector insert function in C++

By Harsh Singh

Here we will learn about the insert() function present in C++ STL. insert() function is used to insert a new element in a vector. By taking two arguments: The iterator of the posit.... Read More

Return array from function by reference in C++

By Harsh Singh

Here we will learn how to return an array by reference from a function in C++. We can achieve this in multiple ways. Let’s check these out: First Method: by creating the arra.... Read More

How to delete files less than specific size in C++

By Harsh Singh

In this article, we will learn how to delete files that are less than a given specific size from a directory in C++. We will follow the following steps for this – Open the di.... Read More

How to find the size of an array in C++

By Harsh Singh

Here we will see how can we find the size of a given array if the size is not known. Using sizeof() operator: The sizeof() operator returns the size of any data type passed to it. .... Read More

The pipe ( | ) operator in C++

By Harsh Singh

The pipe operator (|) in C++ is also known as bitwise or operator. The “bitwise or” operator (or pipe operator) in C++ takes two numbers as operands and checks their co.... Read More

Convert vector to string in C++

By Harsh Singh

Given a vector, we are supposed to make a string containing all of its elements in C++. It will be a single string of vector elements. Example: Vector Elements: {“hello”.... Read More

Convert comma separated string to vector in C++

By Harsh Singh

Given a comma-separated string, we want to convert it to a vector in C++. Example: String: "Hey,there,Howare,You" Vector elements: "Hey" "There" "Howare" "You" First Approach: In t.... Read More

Related Posts