I use std::thread in my C++ class in my Visual Studio 2015 project.
class BaggageSoln { void mainProcess(); // Threading functions void run(); void startZED(); void closeZED(); private: std::thread zed_callback; } void BaggageSoln::startZED() { // Start the thread for grabbing ZED data has_data = false; zed_callback = std::thread(&BaggageSoln::run); //Wait for data to be grabbed while (!has_data) sleep_ms(1); } void BaggageSoln::mainProcess() {} void BaggageSoln::run() {} void BaggageSoln::closeZED(){} Error is happening at xthread file at line 238. What could be wrong?