I am learning C++, so you are very right to assume that I am new to C++ and programming as well.
I am trying to understand iostream
library, not the whole, but the things that newcomers must know before jumping into another topic. My understanding of std::cout
is that it is a variable that holds bunches of chars or value of other variables for outputting into the console.
Now I am curious to know maximum number of chars as a string--giving directly(like std::cout <<"hello\n"
--it(std::cout) can output to the console.
std::cout
is not limited, but a string literal is. – Mcelroystd::cout
is limited and it's size is implementation defined. Also, there may be layers and multiple buffers, depends on the Operating System. You can always write a test program to get information about your system. – Galbreath