摘要: 单一继承多次 代码: class great_great_father { public: great_great_father() { cout << "function: \tgreat_great_father()" << std::endl; } ~great_great_father() 阅读全文
posted @ 2016-03-04 22:29 literalkernel 阅读(746) 评论(0) 推荐(0) 编辑
摘要: 类型别名 就是给一个类型起一个简单,容易理解的名字 typedef double num; 形式: typedef 原名 别名; 坑:这条语句后面有分号。 而且原名和别名的位置与#define刚好相反 auto 让编译器推断类型。 我个人理解:有些中间量的类型名是在是太长了,一不小心就错了,而且很难 阅读全文
posted @ 2016-03-04 22:11 literalkernel 阅读(163) 评论(0) 推荐(0) 编辑
摘要: 起步Hello world!1 #include 2 3 int main()4 {5 std::cout<<"Hello, world!";6 return 0;7 }基本输入和输出对象cin 标准输入cout 标准输出cerr 标准错误clog 标准日志注释... 阅读全文
posted @ 2016-01-22 15:45 literalkernel 阅读(986) 评论(0) 推荐(0) 编辑