char buf[20];
... //assign some value
for (char* i = buf;
*i != '\0';
i++)
*i = toupper(*i);
Typical iterator usage:
vector < char > buf;
... //assign some value
for (vector < char >::iterator i=buf.begin();
i!=buf.end();
i++)
*i = toupper(*i);
operator | input | output | forword | bidirect | random |
|---|---|---|---|---|---|
| _ == _ | x | x | x | x | |
| _ != _ | x | x | x | x | |
| * _ | x | x | x | x | |
| ++ _ | x | x | x | x | x |
| _ ++ | x | x | x | x | x |
| _ = _ | x | x | x | x | |
| -- _ | x | x | |||
| _ -- | x | x | |||
| _ +=(int) | x | ||||
| (int)+ _ | x | ||||
| _ +(int) | x | ||||
| _ -= | x | ||||
| _ - (int) | x | ||||
| int:_ - _ | x | ||||
| _ [ _ ] | x | ||||
| _ < _ | x | ||||
| _ > _ | x | ||||
| _ >= _ | x | ||||
| _ <= _ | x |
... istream_iterator < string, ptrdiff_t > in(cin); istream_iterator < string, ptrdiff_t > end; while (in != end) cout << *in++; ...
... ostream_iterator < string, ptrdiff_t > out(cout); copy(in, end, out); ...
back_inserter(Container&) builds one
front_inserter(Container&) builds one
inserter(Container&, Iterator) builds one