Reputation: 13
I tried to use std::thread
like this, but it gave me a "thread" is not a member of "std" error: (stdio.h
is included)
std::thread thread_obj(makeFile, 512, MEGABYTE, "file");
Upvotes: 0
Views: 104
Reputation: 596206
std::thread
was introduced in C++11 in 2011. However, C++Builder 6 was released in 2002, thus it predates C++11 by almost a decade. C++Builder 6 only supports C++98, hence the error.
C++11 support was first added in C++Builder XE4, which was released in 2013. And XE4 supported C++11 only under 64bit development - 32bit support for C++11 wasn't added until several versions later.
So, you need to upgrade to a modern version of C++Builder if you want to use modern C++ features.
Upvotes: 0