Showing posts with label STL. Show all posts
Showing posts with label STL. Show all posts

Thursday, May 24, 2007

STL Clips 1

Guess the output of that program:


#include <iostream>
#include <algorithm>
using namespace std;

int main()
{
string str = "<F";
transform(str.begin(),str.end(),str.begin(),bind2nd(plus<char>(),-2));
cout << str;
return 0;
}


Output (highlight to see):
:D