Quote Originally Posted by Secured
I like this part... wiping a string...
Code:
using namespace std::string cup;
.
.
.
cup.erase( 0, cup.length() );
.
.
.
Is that correct?
No, it should be:
Code:
std::string cup;
.
.
.
cup.erase( 0, cup.length() );
If you want the using directive, then write:
Code:
using namespace std;
string cup;
Incidentally, there is a shortcut for this, i.e.,
Code:
cup.clear();