In cppreference.com, it states that the begin() and end() functions are defined in the header file < iterator >. But I still can use the begin() and end() functions without including the < iterator > header. I wonder why? Is it because I use;
using namespace std;
So it is included?
using namespace xxxdoesn't include any header files. It only means that you can writebegin()instead ofstd::begin(). The `<iterator> header must be included through some other header that you did include into your .cpp.using namespace std;in real code.