5155| 7
|
新人~浏览目录程序,指针内存问题,Segmentation fault (core dumped) |
10金钱
最佳答案struct stat* stat_buf= malloc(sizeof(stat)); 应该改成 struct stat* stat_buf= malloc(sizeof(struct stat));
我试了下,struct stat stat_buf= malloc(4) 这样是通不过编译的
| ||
| ||
| ||
| ||
| ||
| ||
| ||
| ||
|手机版|OpenEdv-开源电子网
( 粤ICP备12000418号-1 )
GMT+8, 2025-2-23 15:43
Powered by OpenEdv-开源电子网
© 2001-2030 OpenEdv-开源电子网