I'm trying to find out how to get the number of CPU cores programmatically. This is the code I'm using:
SYSTEM_INFO sysinfo;
GetSystemInfo( &sysinfo );
std::cout << "CPU count: " << sysinfo.dwNumberOfProcessors << std::endl;
This is running on Windows on the iMac i7 via Boot Camp. It would be nice to find out that Apple made a manufacturing mistake and put an 8-core in my machine instead of a 4-core.