Necuima Posted May 1, 2015 Share Posted May 1, 2015 Hi Larry, I have loaded these 3 scripts into my Dev-C++ IDE and they work just fine. But I don't understand how main.cpp 'knows' about Rational.cpp; there doesn't seem to be any direct reference to it either from main.cpp or Rational.h. Also, I had to add <stdlib.h> to Rational.cpp to cater for the abs (absolute value) bit in the 'normalize' method. Any enlightenment will be most appreciated and thank you in anticipation. Cheers from Oz. Link to comment Share on other sites More sharing options...
Larry Posted May 1, 2015 Share Posted May 1, 2015 Good question! Rational.cpp is compiled along with main.cpp to create the binary. This is how main.cpp has access to its contents. Link to comment Share on other sites More sharing options...
Recommended Posts