erase Questions
8
Solved
How can I securely remove a file using python? The function os.remove(path) only removes the directory entry, but I want to securely remove the file, similar to the apple feature called "Secure Emp...
4
Solved
Does it works correctly (does nothing) when I use
vector<T> v;
v.erase(v.end());
I want to use something like
v.erase(std::find(...));
Should I if is it v.end() or not?
There is no info ...
Paley asked 6/3, 2012 at 19:1
6
Solved
I have a vector that stores pointers to many objects instantiated dynamically, and I'm trying to iterate through the vector and remove certain elements (remove from vector and destroy object), but ...
Runyan asked 13/6, 2009 at 19:27
15
Solved
I'm reading data from 9 different sensors for my robot and I need to display them all steadily, in the same window so I can compare the values and see if any of the readings is off.
The problem I'...
8
Solved
I know that there are similar questions to this one, but I didn’t manage to find the way on my code by their aid. I want merely to delete/remove an element of a vector by checking an attribute of t...
9
Solved
I have this INPUT, it will clear everytime we click inside of it.
The problem:
I want to clear only if value = [email protected]
<script type="text/javascript">
function clearThis(tar...
Sennar asked 21/6, 2013 at 14:29
15
Solved
How can I erase the current printed console line in C? I am working on a Linux system. For example -
printf("hello");
printf("bye");
I want to print bye on the same line in place of hello.
1
Solved
C++11 changed std::vector::erase to take a const_iterator instead of an iterator. The same thing applies to std::deque and std::list, while std::forward_list came in C++11 with erase_after, which a...
7
Solved
I want to clear a element from a vector using the erase method. But the problem here is that the element is not guaranteed to occur only once in the vector. It may be present multiple times and I n...
5
Solved
How do I erase a whole array, leaving it with no items?
I want to do this so I can store new values in it (a new set of 100 floats) and find the minimum.
Right now my program is reading the minim...
2
I have written a simple program to test "vector.erase" feature. There is a simple class (MyClass0) which writes some related message in it's constructor and another in it's destructor. An...
Genus asked 17/11, 2022 at 13:16
9
Solved
How and why do 7- and 35-pass erases work?
Shouldn't a simple rewrite with all zeroes be enough?
16
Solved
I have a std::vector<int>, and I want to delete the nth element. How do I do that?
Example:
std::vector<int> vec;
vec.push_back(6);
vec.push_back(-17);
vec.push_back(12);
vec.erase(??...
2
I've just written the following code, and was very surprised it doesn't compile:
std::deque<int> container;
// filling the container...
for (auto it = container.rbegin(); it != container.ren...
Jesuit asked 25/1, 2016 at 15:26
5
Solved
What is the difference between remove and unlink functions in C++?
9
Solved
Whats a simple way to delete the last two characters of a string?
Abase asked 1/2, 2011 at 8:9
12
Solved
I got a string and I want to remove all the punctuations from it. How do I do that? I did some research and found that people use the ispunct() function (I tried that), but I cant seem to get it to...
Chancemedley asked 2/10, 2013 at 14:10
6
Solved
My map is defined as such:
map<string, LocationStruct> myLocations; where the key is a time string
I am only keeping 40 items in this map, and would like to drop off the last item in the ma...
Freighter asked 21/6, 2012 at 17:7
6
Solved
I want to delete a sensitive file (using C++), in a way that the file will not be recoverable.
I was thinking of simply rewriting over the file and then delete it, Is it enough or do I have to per...
Pearlinepearlman asked 8/9, 2011 at 10:59
2
I have 2 vectors vc and v2 I want to remove all elements from vc that are contained in v2.I try to do this by 2 nested loops. However the compiler gives an error: Debug Assertion Failed. I would li...
2
Solved
For the new C++17 std::unordered_map::extract function the documentation says:
Extracting a node invalidates only the iterators to the extracted
element, and preserves the relative order of the...
Retsina asked 10/10, 2018 at 11:24
2
Solved
I've read this SO post, and this one too regarding
the erasure of elements from a std::set during iteration.
However, it seems that a simpler solution exists in C++17:
#include <set>
#includ...
3
I want to create animation in console, when program waits. There are a lot of simple ways to do this, usually, we just draw symbols in iterations of some cycle.
Let our code be:
func Spinner(delay...
0
I am using functionality of erasing image and my code is like below. You can see Video HERE. Here current_sticker_img is my Imageview
NOTE: I am also using Pan Gesture for zooming image
//MARK:...
Polyandrous asked 31/3, 2017 at 10:4
4
Solved
I am trying to "clean up" a ByteBuffer to be all zero bytes (all 0x00). I tried to loop over all positions in the buffer and set them to 0x00, but the efficiency is bad. Is there any better way to ...
Esch asked 25/6, 2012 at 21:51
1 Next >
© 2022 - 2025 — McMap. All rights reserved.