You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docker run -i --rm zeldin/ps3dev-docker bash -s <<EOFecho '#include <iostream>#include <thread>// Function to be executed by the threadvoid threadFunction(int threadID) { std::cout << "Thread " << threadID << " is executing" << std::endl;}int main() { // Creating a thread and passing a function to execute std::thread t1(threadFunction, 1); // Joining the thread to the main thread t1.join(); // Output a message from the main thread std::cout << "Main thread is executing" << std::endl; return 0;}' > oo.cppppu-g++ oo.cpp -o oo -std=c++11EOF
output
oo.cpp: In function 'int main()':
oo.cpp:11:10: error: 'thread' is not a member of 'std'
std::thread t1(threadFunction, 1);
^~~~~~
oo.cpp:11:10: note: suggested alternative: 'tera'
std::thread t1(threadFunction, 1);
^~~~~~
tera
oo.cpp:14:5: error: 't1' was not declared in this scope
t1.join();
^~
oo.cpp:14:5: note: suggested alternative: 'tm'
t1.join();
^~
tm
The text was updated successfully, but these errors were encountered:
Trying to compile std::thread
output
The text was updated successfully, but these errors were encountered: