Please use the code tag to the right under format, its the <> button. You can edit and highlight your code then press the <> button.
Where is the function getdate() defined? The compiler can not find the function being called. Then you are sending the address of d to the function not the value of d. The use of & may be needed in the function definition, but not in the call. It would also be useful to know what header files you have included.