What's so bad about casting malloc in C? Wouldnt it be better because it will be easier to transfer your C code to C++?