Name: Anonymous 2012-11-04 22:55
>warning: conflicting types for 'something' [enabled by default]
If put the main after the functions this doesn't show up, why?
If put the main after the functions this doesn't show up, why?
main() and put the definition below.
int dicks(int x);
int main(int argc, char **argv){
if(argc < 2){
return 1;
}
printf("Dicks! :%d\n", dicks(atoi(argv[1])));
return 0;
}
int dicks(int x){
int i;
int j = 0;
for(i=0; i<x; ++i){
j += x % i;
}
return j;
}
int(int). As I recall, strict compatibility with C99 requires that this behavior be deprecated.main at the end, but not everyone prefers it. If you have functions that call one another, it will of course be impossible to avoid prototyping at least one of them.