Struct as argument

You need to post ALL of your code.

The IDE does not create function prototypes for functions that take reference arguments. There is (yet) no proof that you did, either.

Generally, struct definitions work better when they are defined in a header file.