Yes but in C++ we use new and delete instead of malloc, calloc, and free.
So this:
Code:
char* csource = reinterpret_cast<char*>(malloc(MAX_PATH));
Should be:
Code:
char* csource = new char[MAX_PATH];
And to clean up
Code:
delete [] csource;