You've got double quotes when you need single quotes:
(input_message[output] == " ")
The " " is a pointer to a string (of a single blank) while input_message[output] is a single character (converted to int for comparison).
Also, the statement input_message != " " won't ever evaluate to true, as you're comparing two pointers and not what the pointers reference. Have a look at strcmp() and strncmp() functions which I think will do what you want in this situation.
There may be other issues; I didn't look all that closely.