std::sstreamIt is deduced both from std::istream, and std::ostream. This means that you do not need to include <istream>or <ostream>. However, std::coutit is not defined in either of these two headings. You need one more heading for this <iostream>.
source
share