Question regarding #include <iostream>

This means every program I write I have to include iostream. If not what exactly does iostream do in this program?

If you mean in the TripleX program, then it is only there so you can use the cin / cout statements

It gives you access to the I/O stream library which std::cin and std::cout are a part of.

Thanks for answering. But wont the cin / cout statements will be used in every single program so we still would have to include #iostream in every program?

If you’re using them then yes. Not all programs use them.

Hey Dan, Thank you for answering my questions :grinning:

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms