#include <windows.h> #include <stdio.h> int main(){ SYSTEM_INFO si; GetSystemInfo(&si); int m_nProcessers = si.dwNumberOfProcessors; printf("CPU 核心数目:%d ", m_nProcessers); return 0; }