摘要:
函数默认参数 在C++中,函数的形参列表中的形参是可以有默认值的; 语法:返回值类型 函数名 (参数 = 默认值){ } 实例: #include<iostream> using namespace std; //函数默认参数 int func1(int a, int b = 20, int c = 阅读全文
摘要:
指针:指针保存的是数据的地址; #include<iostream> using namespace std; int main() { //1、定义指针 int a = 10; //指针定义的语法:数据类型 * 指针变量名; int * p; //让指针记录变量a的地址 p = &a; cout 阅读全文