#include #include #include "point.cc" // Notice inclusion of the cc file, in order to // instantiate the template for int and double. // Else lots of linker errors will occur. // This treats templates in the same way as inline functions. // The C++ Programming Language, 4ed, page 695ff. int main(){ Point pd1, pd2(1,2); Point pi1, pi2(3,4); pd2.move(1,1); pi2.move(1,1), std::cout << "pd2: " << pd2 << std::endl; // (2,3) std::cout << "pi2: " << pi2 << std::endl; // (4,5) }