学CS50x时遇到
#include<cs50.h>
#include<stdio.h>
int main(void)
{
int numbers[] = {4 ,6 ,8 ,2 ,7 ,5 ,0};
for(int i = 0; i < 7; i++)
{
if(numbers[i] == 0)
{
printf("Found\n");
return 0;
}
}
printf("Not found\n");
return 1;
}
/usr/bin/ld: /lib/x86_64-linux-gnu/Scrt1.o: in function _start': (.text+0x1b): undefined reference to
main'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [: numbers] Error 1
完全不懂
恢复原来