0
Explain please
look some blogs are saying that..... cout cin these objects are defined in iostream header files.. ...some are saying they are defined in istream and ostream...... and some are saying they are defined in namespace....... where these are actually defined and how namespace std actually works....
2 Respuestas
+ 5
cin is object of class istream. cout is object of class ostream. These objects and their classes defined in std namespace in iostream
+ 2
Why don't you look at them yourself?
GNU's iostream: https://github.com/gcc-mirror/gcc/blob/master/libstdc%2B%2B-v3/include/std/iostream
GNU's istream:
https://github.com/gcc-mirror/gcc/blob/master/libstdc%2B%2B-v3/include/std/istream
GNU's ostream: https://github.com/gcc-mirror/gcc/blob/master/libstdc%2B%2B-v3/include/std/ostream