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
{{ message }}
This repository has been archived by the owner on Mar 13, 2024. It is now read-only.
docker run -i --rm mlafeldt/ps3dev 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 'void threadFunction(int)':
oo.cpp:6:18: error: 'Thread' was not declared in this scope
oo.cpp:6:42: error: 'is' was not declared in this scope
oo.cpp:6:45: error: expected ';' before 'executing'
oo.cpp: In function 'int main()':
oo.cpp:11:5: error: 'thread' is not a member of 'std'
oo.cpp:11:17: error: expected ';' before 't1'
oo.cpp:14:5: error: 't1' was not declared in this scope
oo.cpp:17:18: error: 'Main' was not declared in this scope
oo.cpp:17:23: error: expected ';' before 'thread'
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: