I am now writing the program code in C ++, using the techniques of C - so familiar. That is, the code is very close to the C program, but compiled by the C ++ compiler. In particular, I allocate memory for structures with functions malloc, free instead of new, delete. Is it right and safe?
// Это C++ struct P { ... }; P *p = (P *)malloc(sizeof(P)); free(p);