#include <iostream>
#include <thread>
using namespace std;
void thread_c() {
    for (int i = 0; i < 11; ++i) {
        cout << i;
    }
}
int main() {
    thread t(thread_c);
    t.join();
    return 0;
}
Such simple example, but it doesn't work on my g++ (MinGW.org GCC-6.3.0-1) 6.3.0, Windows 8.1
Here's the error:
main.cpp: In function 'int main()':
main.cpp:13:5: error: 'thread' was not declared in this scope
     thread t(thread_c);
     ^~~~~~
main.cpp:14:5: error: 't' was not declared in this scope
     t.join();
     ^
*I've been working on a big project, and noticed about some compilation errors. I wrote this code for testing my compiler out
What's wrong with it?
 
    