Why does this work in C:
But C++ requires an explicit cast from pointer-to-void:
Is the compiler just trying to enforce clarity?
Code:
int x = 10;
int * pti = malloc( sizeof(int) * x );
Code:
int x = 10;
int * pti = (int *) malloc( sizeof(int) * x );
Is the compiler just trying to enforce clarity?