I try to learn how to use C++11 thread library and then, I am confused about the output of my following code.

```
#include <iostream>
#include <thread>
#include <mutex>

std::mutex mtx;

void thread_function()
{
    std::cout << "Inside Thread :: ID = " << std::this_thread::get_id() << std::endl;
}

int main()
{
    std::thread threadObj1(thread_function);
    std::thread threadObj2(thread_function);

    if (threadObj1.get_id() != threadObj2.get_id())
        std::cout << "Both threads have different id" << std::endl;

    threadObj1.join();
    threadObj2.join();
    std::cout<<"From Main Thread :: ID of Thread 1 = "<<threadObj1.get_id()<<std::endl;
    std::cout<<"From Main Thread :: ID of Thread 2 = "<<threadObj2.get_id()<<std::endl;

    return 0;
}

```

I attach every std::cout with std::endl in order to flush the buffer and output the '/n' character. However, finally I got the output as the following.

```
Both threads have different idInside Thread :: ID = Inside Thread :: ID = 
0x700003715000
0x700003692000
From Main Thread :: ID of Thread 1 = 0x0
From Main Thread :: ID of Thread 2 = 0x0
Program ended with exit code: 0

```

It seems that the '/n' before the Inside Thread disappeared. Could you please help me figure it out? Thank you so much!