摘要:
Father.hpp 1 // 2 // Created by Administrator on 2021/7/15. 3 // 4 5 #ifndef C__TEST01_FATHER_HPP 6 #define C__TEST01_FATHER_HPP 7 8 9 class Father { 阅读全文
摘要:
1 // 2 // Created by Administrator on 2021/7/15. 3 // 4 5 #ifndef C__TEST01_PERSON_H 6 #define C__TEST01_PERSON_H 7 8 //类模板 9 template<class T1, class 阅读全文
摘要:
1 #include <iostream> 2 using namespace std; 3 4 //常量指针 5 void test01(){ 6 int a = 4; 7 int b = 2; 8 int *const p = &a; 9 cout<<"*p = "<<*p<<endl; 10 阅读全文
摘要:
1 #include <iostream> 2 using namespace std; 3 4 //函数的值传递 5 template<typename T> 6 void swapValue(T a, T b){ 7 cout<<"值传递函数开始前a = "<<a<<", "<<"b = "<< 阅读全文