There is an 'erase-remove' idiom in C++ when it comes to removing several elements from containers, and there are discussions about an alternative 're ...
There is an 'erase-remove' idiom in C++ when it comes to removing several elements from containers, and there are discussions about an alternative 're ...
There are several posts focused on the fast removal of elements given by indices from a vector. This question represents a slightly modified version o ...
Given a vector of integers, iterate through the vector and check whether there are more than one of the same number. In that case, remove them so t ...
Firstly, I'm trying to create a program which takes two char arrays and removes from the first any chars that shew up in the second array. I have adde ...
I got a question where I need to write a function that reads an integer X and an array A of type int (size N) from the keyboard and eliminates all occ ...
If you have defined a range of elements you want to "erase", is it more efficient to call vector::erase(iterator) for every element in the range, or t ...
I have been trying to create a C++ program to find all the prime numbers under a certain integer, n, using the Sieve of Eratosthenes algorithm, which ...
I am reading some text from another process through a pipe. The pipe returns the data to the variable chBuf but contains lots of non-printable chars. ...
C++ ranges are nice, but AFAIK they still "suffer" from the fact that they do not know to modify containers, e.g. if you use ranges::remove you still ...
I've got two vectors: The remove_flags vector contains an array of flags of the exact same size as data, each flag is either 0, or 1, where 1 means ...
I am trying to remove the double quotes characters from my vector string value. for eg: if my vector string has values (50,40,"50GB","40GB",60). i am ...
mySongs is a vector that store a collection of songs input by the user. In the if statement, the program will check the elements in the vector with us ...
I want to erase all elements with value greater 2 and less 5 here is the code : output: 3 3 3 1 2 4 5 2 4 9 Where is the problem. ...
I have a vector of structs and I want to remove an element from the vector with specific values.I know how it can be done for for example a vector of ...
If I add or delete an element while iterating over an Array or an Array-like object in Javascript, do I need to take into account that the underlying ...
So I want to compare the 0th element of a vector with the other elements to see if they're equal because I want to remove other instances of that elem ...
When removing the given elements from the given array, I keep getting an error. This is my code, I am not sure where I the error is: I then receiv ...
i am trying to remove all Orders that have old pizza than 3 days : i have this vector of pairs : and this class Order: and i did something like ...
I want to remove an element from a vector, but it is not guaranteed that the element exists. I have looked online but found no information regarding h ...
I am writing an octree algorithm. Inside function I traverse octree. I get node pointer and Sphere as input. I check if node should hold sphere then I ...