Many of us learned using printf()
long before we learn to use constructors and destructors. So when it's time to switch to C++ many will stick to printf()
for console output.
Sometimes you can hear:
printf()
is bad, you should usecout <<
instead, because it's C++
What is an advantage of abandoning using printf()
and switching to cout <<
?