Need cpu count in linux
I would like my c++ program to get the cpu count of an intel processor with the linux operating system. I have found code on the internet but they all uses window include files and won't run under linux. I read that one can get the cpu count by typing grep -c processor /proc/cpuinfo in a linux shell but I need it in my program. Would I have to make a system call, save it to a file and then read it in?