Are there any recommendations for porting from C to C ++

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.

+5
source share
5 answers

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:

+5

++, C? C ++? , - , , . - , ; , , .

+3

Effective ++ C, ++, . , 2 ++ ( ).

, , GCC ++. .. .. ++, , .

+2

, .

, , ++ C. C ++ - . , . C ++, ++ C.

C ++ ++.

+2

, , , new/delete malloc/free .. , C-. ( C), - . ++.

, -, , .

- . , ++ stat struct stat. , , , . . sizeof , .

sizeof - , . , sizeof('a') C sizeof(int) ++ sizeof(char) (so 1). enum enum.

+2

All Articles