#include <iostream>
#include <algorithm>
#include <string>
#include <functional>
using namespace std;
int main()
{
string test = "f1=a|f2=b|f3=c";
replace_if(test.begin(), test.end(), bind2nd(equal_to<char>(), '|'), ',');
cout << test << endl;
return 0;
}
아 요새 계속 놀았더니 머리가 자꾸 썩어서 이런 것도 바로 코드가 안 나와-_-




덧글
안드로이드 2006/05/19 10:23 # 답글
하악~ STL...