Hi, im reading B.Stroustrup's book : Programming principles and practice using C++ . Im doing every single exercise and so far i have done them all.
But now i saw this exercise and i dont really know where to begin
Modify the ... program to make the input stream an explicit parameter. rather than simply using cin. Also give Token_stream constructor an istream& parameter so that when we figure out how to make our own streams (attached to files) we can use the ... program for those. Hint : Dont try to copy an istream
Hints:
Add a member of type std::istream reference to Token_stream
Write a constructor that takes an istream reference
Initialise member in constructor
In get_input(), use member instead of std::cin