View Single Post
Jan2-12, 05:33 PM
P: 15,166
You declared the function as void tempC2F_REF(double tempInCelsius, double returnByREF). When the compiler gets to the call in main(), all the compiler knows about is this declared (but not defined) function tempC2F_REF(double,double). Later you define the function void tempC2F_REF(double tempC, double& TRef). This function has a different signature than the declared function, so it is a different function. You never defined the function with signature tempC2F_REF(double,double), so you got a linkage error.

Fix your declaration to match the definition and all will be well.