2015年5月26日

泛型auto

摘要: 1 /*auto*/ 2 3 #include 4 5 void main() 6 { 7 auto num = 10.9; // 自动变量 自动匹配类型 8 auto numA = 10; 9 std::cout << num << numA << std::endl... 阅读全文

posted @ 2015-05-26 10:08 Dragon-wuxl 阅读(147) 评论(0) 推荐(0)

函数重载与函数默认参数

摘要: 1 /*函数重载的原理*/ 2 3 // c中 4 5 // 参数的个数参数的类型不同 顺序不同 与返回值无关 6 void go(int a) 7 { 8 std::cout << a; 9 }10 11 void go(double a)12 {13 std::cout <... 阅读全文

posted @ 2015-05-26 09:39 Dragon-wuxl 阅读(144) 评论(0) 推荐(0)

导航