0
How cout can display the text on the screen ???
it's a function what's it's contents
6 Antworten
+ 9
cout is not a function, but an object of the class ostream, as read here: http://www.cplusplus.com/reference/ostream/ostream/
And this is the source code for ostream (good luck understanding any of it): https://gcc.gnu.org/onlinedocs/libstdc++/libstdc++-html-USERS-3.4/ostream-source.html
Also, look here to see why you need the namespace std to use it: http://www.cplusplus.com/doc/oldtutorial/namespaces/
+ 2
@Tamra wooow, even after reading the ostream source code I can't understand how it work... One day Im gonna be as good (more) as the genius who wrote it !
+ 2
in layman's terms
cout is kind of a command u give, to print ur text on the screen
+ 1
i think cout actually means console output.
so its just outputting your input otherwise you would never see the outcome of your code.
wouldent analyze it too much.
+ 1
Thanks Sakina Halvadwala
0
thanks guys but I need more explanation 😊