How do you correctly use malloc()? I.E. without casts. I thought this was how:
But my compiler complains that it 'cannot convert void* to int*', so I'm forced to use a '(int*)' cast.Code:int* data = malloc(sizeof(int) * 10);
Oh yeah, and when do I use each of reinterpret_cast, static_cast and const_cast?