c++ 匿名函数

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

int main()
{
    //为了在以后便于区分,我这段main()代码叫做main1
    auto
    func = [] 
    { 
        printf("%d\n",1989); 
    };

    func();
    system("pause");
    return 0;
}

 

posted @ 2014-12-02 16:52  yufenghou  阅读(175)  评论(0)    收藏  举报