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

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

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

10条回答
  •  闹比i
    闹比i (楼主)
    2021-02-19 00:49

    Not really, printf() is quite faster than cout, and the c++ iostream library is quite large. It depends on the user preference or the program itself (is it needed? etc). Also, scanf() is not suitable to use anymore, I prefer fgets().

提交回复
热议问题