Click here to Skip to main content
15,884,099 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
why we do not need to specify format when we print or accept element through cout and cin?


Edit: Some spelling changes
Posted
Updated 11-Mar-12 1:48am
v2
Comments
Sergey Alexandrovich Kryukov 11-Mar-12 16:59pm    
Do you think you correctly formulate the question? Why would we need a format?
--SA

The << operator is overloaded. So, the compiler calls to the right function.

 
Share this answer
 
Comments
member60 12-Mar-12 6:14am    
My 5!
Shmuel Zang 12-Mar-12 16:51pm    
Thanks.
You do not need to format anything.
You can use the defaults.
For special formatting, you have to specify formatting. (Hmmm... Rhymes :))
 
Share this answer
 
because cout has a different implementation than printf.. :)
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900