Mam taki program:
#include <iostream>
#include <thread>
using namespace std;
void function1(){
cout << "DZIALAM!!!!!" << endl;
}
int main(){
thread t1(function1);
return 0;
}
I dostaje taki błąd:
"||=== ewghm, Debug ===|
C:\Documents and Settings\KM\Pulpit\PROGRAMY\ewghm\main.cpp||In function 'int main()':|
C:\Documents and Settings\KM\Pulpit\PROGRAMY\ewghm\main.cpp|10|error: 'thread' was not declared in this scope|
C:\Documents and Settings\KM\Pulpit\PROGRAMY\ewghm\main.cpp|10|error: expected ';' before 't1'|
== Build finished: 2 errors, 0 warnings (0 minutes, 0 seconds) ===| "
W CodeBlocks w ustawieniach kompilatora mam ustawione: "Have g++ follow the C++11 ISO C++ language standard [-std=c++11]"
Korzystam dużo z C++11 i to jest pierwsza rzecz, która mi nie działa. Wiek tos jak sobie z tym poradzić?
Mój system to Windows XP, kompilator to: GNU GCC.
std::thread
.