Good day to all, tell me how in C / C ++ programmatically determine the number of cores in the processor? Maybe there is a method?
#include <iostream> using namespace std; int main() { int numCPU = sysconf(_SC_NPROCESSORS_ONLN); cout << numCPU << endl; }