标签:const png ima print tar normal int ios splay
void printA(int a) { cout<<a<<endl; } std::function<void(int a)> func; func = printA; func(2);
std::function<void()> func_1 = [](){cout<<"hello world"<<endl;}; func_1();
struct Foo { Foo(int num) : num_(num) {} void print_add(int i) const { cout << num_+i << ‘\n‘; } int num_; }; // 保存成员函数 std::function<void(const Foo&, int)> f_add_display = &Foo::print_add; Foo foo(2); f_add_display(foo, 1);
uto closeItem = MenuItemImage::create( "CloseNormal.png", "CloseSelected.png", CC_CALLBACK_1(HelloWorld::menuCloseCallback, this));
void HelloWorld::menuCloseCallback(Object* pSender) { Director::getInstance()->end(); #if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS) exit(0); #endif }
标签:const png ima print tar normal int ios splay
原文地址:http://www.cnblogs.com/xiaohaige/p/7542334.html