Those classes do not appear in the final standard, and your implementation should eliminate them soon as it catches up, if it hasn't already. In particular, that includes cin, cout, and the ifstream and ofstream templates. Second, although Method 0 answers the immediate question, it's only good for when you want to copy the input verbatim. First attempt, sort of okay. Avoid writing code that only solves the immediate problem.
Balanced judgment is one hallmark of the experienced programmer.
Method 1 is only slightly more complex than Method 0, but that extra complexity buys you better extensibility. So, prefer extensibility. Note that this is NOT an open license to go overboard and overdesign what ought to be a simple system. It is, however, encouragement to do more than just solve the immediate problem, when a little thought lets you discover that the problem you're solving is a special case of a more general problem. This is a second hallmark of sound engineering.