>passing arg 1 of `fgets' from incompatible pointer type
fgets expects a pointer to char. You pass it a pointer to int because buffer is defined as an array of int. Change buffer to be an array of char and the warning will go away.
>should this be in my while loop, or outside of it?
Functions can only be defined at the top lexical level of a program. This means that your function
must be outside of main, which is most certainly outside of the loop.
Reputation Points: 6442
Solved Threads: 1393
Bad Cop
Offline 11,807 posts
since Sep 2004