摘要: Ingress-nginx 作用 流量入口管理: Ingress-nginx 是一个 Ingress Controller,负责实现 Kubernetes 的 Ingress 资源功能。 它充当集群的 外部访问入口,处理 HTTP/HTTPS 流量,并根据规则将请求路由到后端的 Service 或 阅读全文
posted @ 2025-08-14 17:07 little小新 阅读(8) 评论(0) 推荐(0)
摘要: #include <iostream> #include <string> using namespace std; //定义学生结构体 struct Student { //定义成员列表 string name; int age; int score; }; //值传递 void printStu 阅读全文
posted @ 2025-07-05 16:46 little小新 阅读(8) 评论(0) 推荐(0)
摘要: 将结构体作参数传入函数中 #include <iostream> #include <string> using namespace std; //定义学生结构体 struct Student { //定义成员列表 string name; int age; int score; }; //值传递 阅读全文
posted @ 2025-07-05 16:33 little小新 阅读(14) 评论(0) 推荐(0)
摘要: #include <iostream> #include <string> using namespace std; //定义学生结构体 struct Student { //定义成员列表 string name; int age; int score; }; //定义老师结构体 struct te 阅读全文
posted @ 2025-07-05 16:19 little小新 阅读(3) 评论(0) 推荐(0)
摘要: #include <iostream> #include <string> using namespace std; //定义结构体 struct Student { //定义成员列表 string name; int age; int score; }; int main() { //声明结构体变 阅读全文
posted @ 2025-07-05 16:08 little小新 阅读(10) 评论(0) 推荐(0)
摘要: 案例描述:封装一个函数,利用冒泡排序,实现对整型数组的升序排序 #include <iostream> using namespace std; //冒泡排序函数 void bubbleSort(int* arr, int len) { for (int i = 0; i < len - 1; i+ 阅读全文
posted @ 2025-06-28 16:53 little小新 阅读(3) 评论(0) 推荐(0)
摘要: #include <iostream> using namespace std; //值传递(不能改变实参a与b的值) void swap0(int a, int b) { //交换值 int temp = a; a = b; b = a; cout << "swap0 a = " << a << 阅读全文
posted @ 2025-06-28 16:28 little小新 阅读(4) 评论(0) 推荐(0)
摘要: 利用指针访问数组元素 #include <iostream> using namespace std; int main() { int arr[10] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }; cout << "第一个元素为:" << arr[0] << endl; 阅读全文
posted @ 2025-06-28 16:12 little小新 阅读(0) 评论(0) 推荐(0)
摘要: 1.常量指针 const int* p = &a; 特点:指针的指向可以修改,但是指针指向的指针不可以修改 如:*p = 20是错误的值不能修改 但:*p = &b;是可以的,重新指向其它的地址 2.指针常量 int* const p = &a; 特点:指针的指向不可以修改,指针指向的值可以修改 如 阅读全文
posted @ 2025-06-28 16:00 little小新 阅读(11) 评论(0) 推荐(0)
摘要: #include <iostream> using namespace std; int main() { //1.指针得定义 int a = 10; //定义整型变量a //指针定义语法: 数据类型 * 变量名 int* p; //指针变量赋值 p = &a; //指针指向变量a得地址(0xxff 阅读全文
posted @ 2025-06-28 12:46 little小新 阅读(2) 评论(0) 推荐(0)