--- In [email protected], "samba8514" <[EMAIL PROTECTED]> wrote:
>
> hi to all ,
> 
> C++ supports (ALMOST) all funtionalites of C 
> and it is also supports for print(),scanf()  
> in that case WHY i have to USE cin and cout
> 
> i am getting any benifits by using those cin and cout?

Not necessarily by using cin and cout, but by using << and >>
operators on other streams.
These operators can be universally used on any stream (as far as I
understand them). You can overload them for any sort of stream you
want to use.
In C, however, you have to know exactly how to perform such actions on
files, so you will have to write your own version of printf() for any
kind of file except for plain text files.
So using << and >> can help to make your C++ code easier to survey,
understand, and maintain.

Regards,
Nico

Reply via email to