随笔分类 -  【Effective C++】

摘要:1 // 先定义两种类型 2 struct A{}; 3 struct B{}; 4 5 class Foo 6 { 7 public: 8 // 将类型A绑定到Foo 9 typedef A classtype; 10 11 void foo() 12 { 13 std::cout 31 class test_traits... 阅读全文
posted @ 2016-04-10 13:13 我们的时光 阅读(263) 评论(0) 推荐(0)
摘要:1 // 2 // 2015-03-05 03/55 3 // 指针、返回值、成员函数 之 const 4 // 5 6 #include 7 #include 8 9 using namespace std; 10 11 // --------------------... 阅读全文
posted @ 2015-03-05 23:38 我们的时光 阅读(232) 评论(0) 推荐(0)
摘要:1 // 2 // 2015-03-04 02/55 3 // 以 const enum inline 代替 #define 4 // 5 6 // 防止同一个物理文件被包含多次 7 #pragma once 8 9 // ----------------------------------1... 阅读全文
posted @ 2015-03-04 22:05 我们的时光 阅读(130) 评论(0) 推荐(0)