Home > C++ > FAQ C++ > FAQ C++ - gcc/g++ > Code that compiles with gcc but not g++
Code that compiles with gcc but not g++
Sunday 12 June 2011, by
#include <stdlib.h>
int main()
{
char* s = malloc(128);
return 0;
}This will compile with gcc, but not with g++. C++ requires an explicit cast from void*
