码迷,mamicode.com
首页 > 编程语言 > 详细

c++ 匿名函数

时间:2014-12-02 17:02:26      阅读:168      评论:0      收藏:0      [点我收藏+]

标签:style   blog   io   color   os   sp   div   log   bs   

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

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

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

 

c++ 匿名函数

标签:style   blog   io   color   os   sp   div   log   bs   

原文地址:http://www.cnblogs.com/yufenghou/p/4137922.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!