Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <vector>
- #include <string>
- #include <map>
- #include <list>
- using namespace std;
- void useint(int);
- void usestring(const string &);
- void testvec(vector<int> v)
- {
- for(vector<int>::iterator it = v.begin(); it != v.end();
- #ifdef USE_POSTINCREMENT
- it++) {
- #else
- ++it) {
- #endif
- useint(*it);
- }
- }
- void testmap(map<string,string> m)
- {
- for(map<string,string>::iterator it = m.begin(); it != m.end();
- #ifdef USE_POSTINCREMENT
- it++) {
- #else
- ++it) {
- #endif
- usestring(it->second);
- }
- }
- void testlist(list<string> l)
- {
- for(list<string>::iterator it = l.begin(); it != l.end();
- #ifdef USE_POSTINCREMENT
- it++) {
- #else
- ++it) {
- #endif
- usestring(*it);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement