c++ – std::this_thread::sleep_for doesnt exist – Windows 10 g++

c++ – std::this_thread::sleep_for doesnt exist – Windows 10 g++

I went back to replit.com to see what they were doing to compile the program. Apparently they used the -pthreads switch:

g++ -pthread -std=c++17 -o main main.cpp

Which now works for me.

c++ – std::this_thread::sleep_for doesnt exist – Windows 10 g++

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *