Questoin from c++

why we use #include iostream in source code?

#include tells the compiler to pull in the contents of the headeriostream. That header provides, among other things, declarations of the objects std::cinandstd::cout`. So the basic “Hello, world” program looks like this:

#include
int main() {
std::cout << “Hello, world\n”;
return 0;
}

1 Like