[置顶] 终于使用c++、结构体,函数实现简单数组元素的插入

摘要: include using namespace std; // 定义结构体 struct MyArray { int arr[100]; // 数组,假设最大长度为100 int n; // 数组当前元素数量 }; //输入函数 void scanf(MyArray& myArray, int& x 阅读全文
posted @ 2024-09-05 19:37 云朵偷喝你酒 阅读(7) 评论(0) 推荐(0) 编辑

初次部分使用c++语言无意发现个数组元素查找的代码

摘要: include using namespace std; // 定义结构体 struct MyArray { int arr[100]; // 数组,假设最大长度为100 int size; // 数组当前元素数量 }; // 输入函数,修改数组内容 void scanf(MyArray& myAr 阅读全文
posted @ 2024-09-04 17:25 云朵偷喝你酒 阅读(2) 评论(0) 推荐(0) 编辑