I am trying to understand namespace `std`. I know what a namespace is. I want to know, is namespace `std` defined in multiple header files?

I have two sample codes here, and they both compile and run fine. One uses `#include<string>` and the other uses `#include<iostream>`. Both use "using namespace std". This tells me that `std` is defined in both headers, is that right? If so, then when I use both headers in the same code, how will the compiler know which `std` to use?

CODE 1:

```
#include <string> 
using namespace std;

int main()
{ 
    string test;
    test = "hello"; 
    return 0; 
} 

```

CODE 2:

```
#include <iostream> 
using namespace std;

int main()
{ 
    string test; 
    test = "hello"; 
    return 0; 
}

```