Computer Science Canada [C++] Why use the STL? A quick example |
Author: | wtd [ Wed Aug 04, 2004 10:23 pm ] | ||||||
Post subject: | [C++] Why use the STL? A quick example | ||||||
So, let's say you want to remove all bad characters (to be defined) from a string. First we'll look at the problem solved without the STL, then taking advantage of it. For both examples we'll want a function which can test to see if a character matches what we'll consider a "bad" character.
Now, without the STL:
And with the STL:
|