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

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

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

10条回答
  •  挽巷
    挽巷 (楼主)
    2021-02-19 00:58

    Coming from a slightly different angle, I'd say it's bad to use scanf in C, never mind C++. User input is just far to variable to be parsed reliably with scanf.

提交回复
热议问题