Back to General discussions forum
There doesn't seem to be a way to report bugs so i will leave this here.
While trying to submit Problem 21, the compiler throws this error:
invalid conversion from âvoid*â to âint*â [-fpermissive]
which is hard to read but definitely has something to do with the -fpermissive compiler option.
But my code is in c not c++, and therefore -fpermissive isn't valid.
is this a known bug??
Hi,
Sorry, I can't do anything to make that easier to read.
However, the error can be removed by using a cast to convert the pointer returned by malloc to the required type.
int *nums = (int*) malloc(sizeof(int)*(max+1));
Thanks very much Quandray.