废话不多说,直接上代码
#include <windows.h>
int get_cpu_cnt()
{
SYSTEM_INFO si;
GetSystemInfo(&si);
return si.dwNumberOfProcessors;
}
废话不多说,直接上代码
#include <windows.h>
int get_cpu_cnt()
{
SYSTEM_INFO si;
GetSystemInfo(&si);
return si.dwNumberOfProcessors;
}