lundi 13 janvier 2020

Sleep Function Namespace issue in C++

I recently did some research and found a sleep function for c++ 11, however, every time I try to use it, I get an error saying this_threadis not a namespace. I am unsure of what to do at this point, I've tried altering the code several ways but none of the work any better. Code

#include <thread>
#include <chrono>

...

std::this_thread::sleep_for(std::chrono::milliseconds(200));

I am using Visual Code Studio and MinGW is my compiler.

Aucun commentaire:

Enregistrer un commentaire