I see a code use istream& as parameter in a class member function.
some like this:
bool read(std::istream& in, int num)
why use the istream ? I think when I need the input operation, I can invoke the std::cin ,not in(the parameter), what's this for?
ps. and I saw almost every code, the writer use the declare:
#inlcude <istream> //1
#include <ostream> //2
why use last 2 explicit? the writer says write these can invoke the << and >>
but I think the <iostream> already have the <istream> and <ostream>, do we need to declare the <istream> and <ostream> explicit?