Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > C - C++ Learning > unary c
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 1 Topic 4070 of 4306
Post > Topic >>

unary c

by Lutz Altmann <lutz.altmann@[EMAIL PROTECTED] > Mar 15, 2008 at 01:15 PM

using namespace std;
using namespace __gnu_cxx;

struct one: public unary_function<int, int>
{

    int operator()(int arg)
    {
        return ++arg;
    }
};


int main(int argc, char** argv) {


 one o1,o2;
 int i = 2;

 unary_compose<one,one> func = compose1(o1,o2);

 cout<<func(i)<<endl;


 return (EXIT_SUCCESS);

}
 




 1 Posts in Topic:
unary c
Lutz Altmann <lutz.alt  2008-03-15 13:15:29 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Wed Oct 15 12:38:40 CDT 2008.