On Fri 2008-06-06 07:56:30 UTC-0000, samba8514 ([EMAIL PROTECTED]) wrote: > in c++ why we use cin and cout insted of printf and scanf??
You can still use printf and scanf in C++ if you wish, but using cin
and cout means your code won't be susceptible to printf-style
formatting bugs, and will usually be easier to read.
int x = 42;
printf("%d%d\n", x); /* there is a subtle bug here */
cout << x << endl; // for C++
