You don't need to use the address-of operator (&) in your calls to scanf. The parameters of your getdate and getprice functions are already pointers to their respective types.