I would like to know if you have links to recommendations for porting from C to C ++.
Mostly I'm interested in constructs for checking C code, which may have problems that the compiler cannot detect? And what are the workarounds?
Note. Please do not respond to things that the compiler may detect.
One way to learn this is to simply read some incompatibility lists between C and C ++ and see which ones create problems at runtime rather than compilation problems. Such lists are numerous, good starting places can be:
++, C? C ++? , - , , . - , ; , , .
Effective ++ C, ++, . , 2 ++ ( ).
, , GCC ++. .. .. ++, , .
, .
, , ++ C. C ++ - . , . C ++, ++ C.
C ++ ++.
, , , new/delete malloc/free .. , C-. ( C), - . ++.
new
delete
malloc
free
, -, , .
- . , ++ stat struct stat. , , , . . sizeof , .
stat
struct stat
sizeof
sizeof - , . , sizeof('a') C sizeof(int) ++ sizeof(char) (so 1). enum enum.
sizeof('a')
sizeof(int)
sizeof(char)
1
enum