#include
`#include` is used to include a library of functions and classes into the code. It literally just copies and pastes the function definitions into the executable when the code is compiled (turned into zeroes and ones). In this case, you are including the library iostream, which has a bunch of functions that tell your computer how to input and output data (that is the 'io' part of 'iostream'). Namespace is a little trickier to explain, but I will just describe it as giving a context to the functions you are using, allowing you to differentiate between two functions with the same name. If you do not do `using namespace std;`, then when you use `cout` and `cin` you will have to instead write `std::cout` and `std::cin`. The symbol `::` is called the "scope resolution operator," because it "resolves the scope" of (specifies) certain identifiers. This is something you will learn more about later on, don't worry too much about it yet.
If you do not `#include <iostream>` you will not be able to use `cout` or `cin` at all.
Thanks a lot!!! You give me pretty good answers!
I'm glad you think so :) If I don't, feel free to ask for clarification.
To elaborate, `cin` and `cout` are not built into C++; they are objects that need to be defined. They are defined in the library iostream, hence you must include iostream to use them.
Join our real-time social learning platform and learn together with your friends!