The errors in this code suggest that the program is using members of a struct that do not exist, and trying to access undefined variables. Additionally, there are warnings about assigning pointer values to integer variables without proper casting.

To fix the first set of errors, the code should be updated to use the correct struct members and variables that are defined. For example, instead of using 'dp->d_type', the code could use 'dp->d_name' to access the name of the file.

To fix the second set of errors, the code should ensure that variables are properly declared and initialized before use, and that pointer values are properly cast to integers if needed.

Overall, the code needs to be reviewed and updated to ensure that it is using valid variables and struct members, and that there are no type mismatches or undefined variables.

C Programming Errors: 'struct dirent' and 'DT_DIR'  - Troubleshooting Guide

原文地址: https://www.cveoy.top/t/topic/mXKY 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录