change the syntaxe to cpp.

replace char by const char and the key word "malloc" by the keyword "new".