《深入理解C指针》第二章 C的动态内存管理
2019-12-01
15:18:44































#include <bits/stdc++.h> #include <stdlib.h> #include <stdio.h> using namespace std; #define maxn 10005 #define M 105 int main(){ int *p = (int *)malloc(sizeof(int)); * p = 4; free(p); p += 10000000; printf("%d\n",*p); system("pause"); return 0; }

造成了段错误。






浙公网安备 33010602011771号