— Call cout.flush();
— But from what I remember I didn't need to do that for the text to be output to the console. What am I not getting here?
Message permanent page
— You don't need to do it when 1. you use endl2. The internal buffer of cout is full3. The code/program leaves scope of cout (end of program) In all three cases a flush is implicitly done
— I don't know what you are not getting 😅
So if I used a cout in the middle of a program without an endl, there is no way the text would show up unless I filled the buffer (which I assume isn't that small)?
— If you need to flush, use std::flush
— In order for new programmers to understand what you do
— I think I get what I did't get now. :P
— Apparently reading from cin flushes the buffer. That's what confused me.
— Anyone has c++ pdf that I can download?
— The internet ;)
— Have your tried Amazon? 😄