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.
There is no specified limit. There may be a practical implementation specific limit. Most likely, it will be way more than you'll need.
Note that std::cout
streams to standard output. While that is often displayed in console, that is not necessarily the case.