Hello there,
every time i compile and link my programs i get the following warning message :
warning (line#): return type of 'main' is not 'int'.
I am using the DJGPP compiler, could that be the reason?
Thank you for your attention.
Hello there,
every time i compile and link my programs i get the following warning message :
warning (line#): return type of 'main' is not 'int'.
I am using the DJGPP compiler, could that be the reason?
Thank you for your attention.
Your main function should always return a type int
int main()
{
program
return 0; /* returns the int value */
}
You probably have used
void main (...)
The type of main should be int. See Axolotl's example.
Maybe in your main() function you've returned something that is not an integer... Post the code, so we can tell...
none...
>normally you can use void main()
Only if your compiler supports such a declaration of main.
-Prelude
My best code is written with the delete key.