मैं std :: this_thread :: sleep_for() फ़ंक्शन का उपयोग करने का प्रयास करता हूं लेकिन त्रुटि
error: 'std::this_thread' has not been declared
त्रुटि प्राप्त हुई।
ध्वज _GLIBCXX_USE_NANOSLEEP शामिल था।
इसे काम करने के लिए मजबूर करने के लिए और क्या चाहिए?
MinGW ==> जीसीसी संस्करण 4.7.2 (जीसीसी)त्रुटि: 'std :: this_thread' घोषित नहीं किया गया है
SSCCE:
#include<thread>
int main() {
std::this_thread::sleep_for(std::chrono::seconds(3));
}
कमांड लाइन:
g++ -D_GLIBCXX_USE_NANOSLEEP -std=gnu++0x ssce.cpp -o ssce.exe
संकलन का परिणाम:
ssce.cpp: In function 'int main()':
ssce.cpp:4:8: error: 'std::this_thread' has not been declared
आप '# शामिल' है? –
kennytm
http://stackoverflow.com/questions/4438084/stdthis-threadsleep-for-and-gcc का डुप्लिकेट? –
क्षमा करें, हाँ, मैं इसका उपयोग करता हूं जिसमें – OlegG