The following code does not compile in gcc, but complies fine with g++,
can anyone tell me the reason why this might happen?
This is a basic program in multicore programming, taken from the book "Professional Multicore Programming and Development for C++ Programmers"
I am a beginner in linux programming.
1 2 3 4 5 6 7 8 9 10 11 12 13 14
// Listing 2-1
// uses sysconf() function to determine how many
// processors are available to the OS.
usingnamespace std;
#include <unistd.h>
#include "iostream"
int main(int argc,char *argv[])
{
cout <<sysconf(_SC_NPROCESSORS_CONF)<<endl;
return(0);
}