void copyFrom(const DateClass &d)
Usually C++ passes function parameters to the function by value. That means that it makes a copy of whatever the caller passes in. Thus if the function modifies the parameter, it won't have any effect on the caller's argument, only on the local copy.
When you add the &, it tells the compiler that you're passing by reference. The function receives a reference to the caller's argument. In your case notice that it's a const reference. That means the compiler will complain if the function tries to modify the parameter. Passing parameters by const reference is a handy way to avoid the cost of making a copy of an argument that's a class instance where it might be expensive to make a copy.
k = sum<int> (i,j);
Instantiate the sum<int> and call it. You might do this to ensure that sum<> is instantiated with the type that you intend.