摘要: 任务一 问题1:这个范例中,Window和Button是组合关系吗? 答::::是的。Window 类包含了一个 std::vector<Button> 成员变量 buttons。这意味着一个 Window 对象拥有(owns)多个 Button 对象,并且这些 Button 对象的生命周期由 Wi 阅读全文
posted @ 2025-11-25 22:57 KXJSLL 阅读(2) 评论(0) 推荐(0)
摘要: 4 #include <stdio.h> #define N 10 typedef struct { char isbn[20]; // isbn号 char name[80]; // 书名 char author[80]; // 作者 double sales_price; // 售价 int s 阅读全文
posted @ 2023-12-18 14:21 KXJSLL 阅读(14) 评论(0) 推荐(0)
摘要: Task1_1 1 #include <stdio.h> 2 #define N 5 3 void input(int x[], int n); 4 void output(int x[], int n); 5 void find_min_max(int x[], int n, int *pmin, 阅读全文
posted @ 2023-12-04 10:46 KXJSLL 阅读(6) 评论(0) 推荐(0)
摘要: Task1_1 1 #include <stdio.h> 2 #define N 4 3 void test1() { 4 int a[N] = {1, 9, 8, 4}; 5 int i; 6 // 输出数组a占用的内存字节数 7 printf("sizeof(a) = %d\n", sizeof 阅读全文
posted @ 2023-11-19 20:01 KXJSLL 阅读(14) 评论(0) 推荐(0)
摘要: Task2_2 1 // 练习:局部static变量特性 2 #include <stdio.h> 3 int func(int, int); // 函数声明 4 int main() { 5 int k = 4, m = 1, p1, p2; 6 p1 = func(k, m); // 函数调用 阅读全文
posted @ 2023-11-06 12:57 KXJSLL 阅读(12) 评论(0) 推荐(0)
摘要: Task1 1 #include <stdio.h> 2 #include <stdlib.h> 3 #include <time.h> 4 #define N 5 5 #define N1 374 6 #define N2 465 7 int main() 8 { 9 int number; 10 阅读全文
posted @ 2023-10-19 16:12 KXJSLL 阅读(15) 评论(0) 推荐(0)
摘要: 一) code1 1 #include <stdio.h> 2 int main() 3 { 4 printf(" O \n"); 5 printf("<H>\n"); 6 printf("I I\n"); 7 printf(" O \n"); 8 printf("<H>\n"); 9 printf 阅读全文
posted @ 2023-10-06 19:35 KXJSLL 阅读(11) 评论(0) 推荐(0)