上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 29 下一页
摘要: //数组指针 //int (*p2)[5] int temp[5] = { 1,2,3,4,5 }; //int *p2 = temp; //用指针直接指向数组的首地址,后面可以直接输出 //int(*p2)[5] = temp; // 用数组指针的时候,要是数组指针指向一个地址,否则报错,如注释部 阅读全文
posted @ 2021-12-02 09:36 江南王小帅 阅读(36) 评论(0) 推荐(0)
摘要: 一路跌跌撞撞 迷迷茫茫 只想快点进步 提升自己 记录代码路上的点点滴滴 或许我不足够优秀 但是我比昨日优秀 阅读全文
posted @ 2021-12-01 17:02 江南王小帅 阅读(35) 评论(0) 推荐(0)
摘要: //指针数组 int *p2[5]; //根据优先级的结合方式,先结合p1与[5],即p1[5],故 首先是一个数组 //而前方有一个指针符号 故 是指针数组 // 下标 0 1 2 3 4 // 元素 int* int* int* int* int* //指针数组是一个数组,每个数组元素存放一个指 阅读全文
posted @ 2021-12-01 16:44 江南王小帅 阅读(50) 评论(0) 推荐(0)
摘要: //指针和数组的区别 char str[] = "I love fishC.com!"; int count = 0; while (*str++ != '\0') // 报错,str 是一个地址,不是可修改的左值 { count++; } printf("一共有%d个字符\n", count); 阅读全文
posted @ 2021-12-01 16:26 江南王小帅 阅读(33) 评论(0) 推荐(0)
摘要: //指针与数组 char str[120]; printf("please input a string:\n"); scanf_s("%s\n", str); printf("your str is :%p\n", str); printf("your str is :%p\n", &str[0] 阅读全文
posted @ 2021-12-01 15:30 江南王小帅 阅读(36) 评论(0) 推荐(0)
摘要: //指針的定義 char a = 'f'; int f = 123; char *pa = &a; int *pb = &f; printf("a = %c\n", *pa); printf("f = %d\n", *pb); *pa = 'c'; *pb = 1; printf(" now a = 阅读全文
posted @ 2021-12-01 15:27 江南王小帅 阅读(35) 评论(0) 推荐(0)
摘要: #include<stdio.h> int fac(int n) { int f; if (n<0) { printf("input number Error!\n"); } else if(n == 0 || n == 1) { f = 1; } else { f = fac(n - 1)*n; 阅读全文
posted @ 2021-11-30 14:37 江南王小帅 阅读(599) 评论(0) 推荐(0)
摘要: if Read_Mac_str == VBS_Mac_str: # 此处为解决问题的代码,其中tkinter为上方import的tkinter root = tkinter.Tk() root.withdraw() tkinter.messagebox.showinfo('提示', 'Write M 阅读全文
posted @ 2021-11-26 10:22 江南王小帅 阅读(97) 评论(0) 推荐(0)
摘要: #统一小写 Read_Mac_str = Read_Mac_str.lower() VBS_Mac_str = VBS_Mac_str.lower() 阅读全文
posted @ 2021-11-26 10:20 江南王小帅 阅读(415) 评论(0) 推荐(0)
摘要: Read_Mac_str = '' VBS_Mac_str = '' with open('./Check_Mac.txt', 'r') as f: for num, line in enumerate(f): if num == 10: print(line) Read_Mac_str = lin 阅读全文
posted @ 2021-11-26 10:19 江南王小帅 阅读(62) 评论(0) 推荐(0)
上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 29 下一页