I have a question about #include <iostream>

I was just wanting to know exactly what this means and does so I can better grasp what my code is doing. Like why should I use this statement over others? Thanks.

It is a glorified copy and paste and the <iostream> header from the C++ Standard Library contains the declarations and definitions of things needed to use std::cout which is what prints to the standard output stream.

Here is a demo of a particular C++ Standard Library implementation. The right hand side is the preprocessed output, that is, what the source code looks like after the preprocessor has run and just before compilation.
If you scroll all the way down you will see what was written on the left and everything above that is the result of #include <iostream>

Privacy & Terms