Roger Luo

超越梦想一起飞
  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2013年3月16日

摘要: bind function adapter (included <functional>) Introduce: bind(op, args, …) Binds args to op Simple Code auto pfn = std::bind(std::plus<int>(), std::placeholders::_1, 10);cout<<pfn(7); // 17 N... 阅读全文

posted @ 2013-03-16 17:30 Roger Luo 阅读(339) 评论(0) 推荐(0) 编辑

摘要: Go to Project Property Page/Cofniguration Properties General/Configuration Type, change as “Dynamic Library(.dll)” C/C++/Code Generation/Runtime Library, change as “/MDd” C/C++/Preprocessor/Preproc... 阅读全文

posted @ 2013-03-16 15:28 Roger Luo 阅读(313) 评论(0) 推荐(0) 编辑

摘要: C++ fstream fin;fin.open(filename, ios::in);if (!fin.good()){ cerr<<"Failed to open "<<filename<<endl; return -1;}fin.seekg(0, ios::end);size_t len = fin.tellg();char * raw = new char[len+1]... 阅读全文

posted @ 2013-03-16 12:55 Roger Luo 阅读(221) 评论(0) 推荐(0) 编辑