bind2nd 컴파일 오류 아, 시바스 리갈 같은 상황. 이럴꺼면 뭣하러 STL써! #include <list> #include <algorithm> #include <functional> #include <iostream> using namespace std; typedef struct mystorage { int i; char c; } mystorage; #if defined(POINTER_TYPE) typedef list<mystorage*> mylist; #else typedef list<mystorage> mylist; #endif #if defined(POINTER_TYPE) inline bool check(const mystorage* _s, int id) { const mystorage& s(*_s); #else inline bool check(const mystorage s, int id) // You can't use below function type. // Standard C++ does not support ref of ref. //check(const mystorage& s, int id) { #endif return s.i == id; } void addList(mylist& lst) { for ( size_t i(0); i<1000; i++ ) { #if defined(POINTER_TYPE) lst.push_front(new mystorage); mystorage& s(**lst.begin()); #else lst.push_front(mystorage()); mystorage& s(*lst.begin()); #endif s.i = i; s.c = i%26+'A';...