廢話不多說,直接上代碼
#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;
}