这是我的一段代码,我想检查下一个是否没有元素,退出程序。但我收到将指针与整数进行比较的警告。我该如何解决它,干杯。
错误是这部分 if(nums[i] == NULL)
/* scanf the file, and store the value in the nums */
for(i = 0; i < numOfInt; i++){
fscanf(f, "%d", &nums[i]);
/* check if the value is too big */
if(nums[i] == NULL){
printf("arg1 is not equal to nums of element in the file\n");
exit(1);
}
}