09 2022 档案

摘要:#include<iostream> using namespace std; /*int main() { int *p; p = new int; if (p==NULL) { cout << "Allocation Failure!\n"; } else { *p = 15; cout << 阅读全文
posted @ 2022-09-30 13:10 江南王小帅 阅读(5) 评论(0) 推荐(0) 编辑
摘要:#include<stdio.h>#include<stdlib.h> //在计算机中,向malloc申请的空间大小是以字节为单位的 //返回的结果是void*,需要类型转换为自己需要的类型 //就把a当做数组使用即可,最后记得释放 int main() { int *a; int Number; 阅读全文
posted @ 2022-09-21 16:58 江南王小帅 阅读(56) 评论(0) 推荐(0) 编辑
摘要:#include<stdio.h>int main() { char ac[] = { 1,2,3,4,5,6,7,8,9,-1 }; char *pc = &ac[0]; while (*pc!=-1) { printf("%d ", *pc++); } printf("\n"); for (pc 阅读全文
posted @ 2022-09-21 14:13 江南王小帅 阅读(120) 评论(0) 推荐(0) 编辑
摘要:#include<stdio.h>int divide(int a, int b, int *result); int main() { int a = 8; int b = 4; int v; if (divide(a, b, &v)) { divide(a, b, &v); printf("%d 阅读全文
posted @ 2022-09-21 11:15 江南王小帅 阅读(45) 评论(0) 推荐(0) 编辑
摘要:#include<stdio.h> int minmax(int a[], int len, int *max, int *min);int main() { int a[10] = { 5,4,3,2,1,6,7,8,9,10 }; int max, min; minmax(a, sizeof(a 阅读全文
posted @ 2022-09-21 10:50 江南王小帅 阅读(119) 评论(0) 推荐(0) 编辑
摘要:#include<stdio.h> int swap(int *p1, int *p2); int main() { int a = 5; int b = 4; printf("a = %d b =%d \n", a, b); swap(&a, &b); printf("a = %d b =%d \ 阅读全文
posted @ 2022-09-21 10:34 江南王小帅 阅读(27) 评论(0) 推荐(0) 编辑
摘要:IDE//VS//VS2017,VS2019没有代码提示的问题解决 开始菜单 -->所有程序–>Visual Studio 文件夹 --> Visual Studio Tools --> Developer Command Prompt for VS2017在DOS命令输入:CD Common7/I 阅读全文
posted @ 2022-09-21 09:04 江南王小帅 阅读(723) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示