C
Chandra Shekhar Kumar
what u need is erase-remove idiom like:
v.erase(remove(v.begin(), v.end()), v.end())
this will do for yr case..
v.erase(remove(v.begin(), v.end()), v.end())
this will do for yr case..
Christopher Armstrong said:Hello! I'm trying to write a part of a program that will remove all files in
its directory. I have tried the std::remove feature of the standard library,
but I don't know its syntax. Also, what's the difference between std::remove
and std::erase? Thanks for your time!
This is the declaration of std::remove:Hello! I'm trying to write a part of a program that will remove all
files in its directory. I have tried the std::remove feature of the
standard library, but I don't know its syntax. Also, what's the
difference between std::remove and std::erase? Thanks for your time!
Christopher Armstrong wrote in
Subject: std::remove Question
Rob, the following doesn't seem to work:
std::remove("*.*");
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.