I saw some programs including <iostream> and <ostream> simultaneously. Why?
Thanks for your kind reply.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
<iostream>is not the combination of<istream>and<ostream>. It merely definesstd::cin,std::coutand related objects. To actually do anything useful withstd::cout, you still need<ostream>. Now, by C++ rules it’s possible that some implementations actually do include<ostream>in<iostream>, but you shouldn’t rely on this.