Here is a struct clarification:
struct Target {
std::ostream &out;
std:: string name;
Target(const std::string &name, std ::ostream &out = std::cout;
bool isLeaf() const;
....
};
I wonder what is the field "out" use for? Instructors comment it "// stream where Target will prints its output". Target is not a function, how can it has a output? I also confused about "std::ostream &out = std::cout", don't understand what is it doing.