0_0_31992001_31518.cpp: In function 'int main()': 0_0_31992001_31518.cpp:11:40: error: invalid conversion from 'void*' to 'int*' [-fpermissive] int *arr = malloc(sizeof(int)*(n + 1)); ^