Is it bad practice to use C features in C++?

前端 未结 10 1991
悲哀的现实
悲哀的现实 2021-02-19 00:16

For example printf instead of cout, scanf instead of cin, using #define macros, etc?

10条回答
  •  时光取名叫无心
    2021-02-19 00:38

    I wouldn't say bad as it will depend on the personal choice. My policy is when there is a type-safe alternatives is available in C++, use them as it will reduce the errors in the code.

提交回复
热议问题