摘要:
函数的文件编写一般有4个步骤: 1.创建后缀名为.h的头文件 2.创建后缀名为.cpp的源文件 3.再头文件中写函数的声明 4.在源文件中写函数的定义 1.创建头文件swap.h #include <iostream> using namespace std; //函数的声明 void swap(i 阅读全文
posted @ 2025-06-26 23:04
little小新
阅读(7)
评论(0)
推荐(0)
摘要:
#include <iostream> using namespace std; //函数的声明,提前告诉编译器函数的存在,可以起到函数随意放在任意位置 //声明可以有多次,定义只能有一次 int max(int a, int b); //int max(int a, int b) //{ // r 阅读全文
posted @ 2025-06-26 22:47
little小新
阅读(4)
评论(0)
推荐(0)

浙公网安备 33010602011771号