Доброе время! Столкнулся с такой проблемой: написал helloWorld #include <iostream> #include <thread>
class background_task { public: void operator()() const { std::cout << «Hello, Multithreaded World!\n»; } };
int main() { background_task bgtask; // Передаем в конструктор функтор std::thread mythread(bgtask); // Продолжаем вычисления в главном потоке mythread.join(); return 0; } При компиляции g++ -Wall -pthread -std=c++11 вылетает ошибка «terminate called after throwing an instance of 'std::system_error' what(): Enable multithreading to use std::thread: Operation not permitted Aborted (core dumped) »