I don't seem to be getting the error any more. I first got it when the structs were declared after the function, but I placed them before the function and still got the error (which was an undeclared identifier on the function). I must be confused. Sorry about that.
Out of curiosity though, why don't I need to pass typedefs as parameters?