Instead of &ostream, write ostream& since you are declaring that the function returns a reference to an ostream, not trying to take the address of ostream (which does not make sense). The same goes...