I am getting the error message on line 170 "Missing prototype for 'getquote'".
Yet line 170 is the start of my function!
The whole program is rather long so I wont post it all here, but does anyone know why the compiler is not recognising my function?
It is 99.9% likely somewhere else in your program. Try to replicate the problem in a small amount of code, who knows? you might figure it out yourself.
This is a prototype
> but does anyone know why the compiler is not recognising my function?
Perhaps it's gcc with the -Wmissing-prototypes warning enabled?
Of course, if you'd actually stated your OS and compiler, then there would be less guessing going on right?
ok i have fixed it. For some reason the compiler didnt like the brackets being empty, so I have added VOID to the brackets. This seems strange as my int main function works fine without this. Anyway it was the Pelles C compiler for windows.
Use a better compiler like GCC (free) or MSVC (not free).
> This seems strange as my int main function works fine without this.
Now you know why main is special :)
It's probably warning you that foo ( ) is really the equivalent (in C) of foo ( ... ), which is basically "I don't care about parameters".
If you really mean void, then you should start saying so (empty parameter declarations are on the deprication path in C as far as I know).