Gib mir die Anzahl der CPU-Kerne:
#include <stdio.h> #include <unistd.h> //---------------------------------------------- int GetCores(void) { return sysconf( _SC_NPROCESSORS_ONLN ); } //---------------------------------------------- void main(void) { printf ("Cores: %d \n",GetCores()); return; } //----------------------------------------------