Did your compiler complain about your function instructions()? Sometimes compiler messages are somewhat cryptic (to the uninitiated, and here's your initiation).
Anyhow, when you use a function and you haven't told C anything about it, C assumes that it is a function that returns an int, and all of its arguments (if any) are ints. Does this make the compiler warnings/errors more clear?
Put a prototype of instructions() before it is invoked.
Then see if there are any other compiler messages.
No?, then on to testing/debugging.
Good luck,
Dave
|