+ 1

What is cout and cin i mean are they an object are they a function ,, how it works ??

what is the coding behind cout and cin .

27th Jan 2017, 10:05 AM
Mina Ghaly
Mina Ghaly - avatar
3 ответов
+ 2
std::cout is an instance of std::ostream. std::cout << "something" calls one of the operator<< overloads as would be done for any instance of std::ostream. It's "special" in that it references the console, but otherwise it behaves exactly as an ofstream or an ostringstream would. You can see some of the actual source here https://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/files.html
27th Jan 2017, 10:13 AM
Alex
Alex - avatar
+ 1
They are an object of the class stream
27th Jan 2017, 10:13 AM
sufian
sufian - avatar
0
1- cin to accept what the user right . 2- cout is to output(to display) what you write in "............." in c programming its know (printf).
31st Jan 2017, 9:30 AM
yasin_chi
yasin_chi - avatar