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

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

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

10条回答
  •  梦毁少年i
    2021-02-19 00:38

    What can be used or not only depends on the compiler that will be used. Since you are programming in c++, in my opinion, to maximize compatibility it is better to use what c++ provides instead of c functions unless you do not have any other choices.

提交回复
热议问题