#include <iostream> #include <thread> int main() { unsigned long const hardware_threads= std::thread::hardware_concurrency(); std::cout << " Number of cores " << hardware_threads << "\n"; }