Today on Mac Xcode directly write cout<< do not encounter enl and do not flush buffer data can not output.
Remember that before the VS and g++ directly output, and then read the C + + input and output buffer refresh problem, resolved this contradiction.
Case of Buffer emptying:
1. The program ends normally. As part of the return work of main, all output buffers are emptied.
2. At some indeterminate time, the buffer may be full, in which case the buffer will be refreshed before the next value is written.
3. Flush the buffer with the operator display, as with Endl.
4. After each output operation is complete, set the internal state of the stream with the UNITBUF operator, thereby emptying the buffer.
5. The output stream can be associated with an input stream, and its associated output buffers are flushed when the input stream is read.
That is, the above 3rd vs and g++ empty the buffer when the buffer is full and then output the program.
cout<< in C + + does not flush buffer and output without encountering Endl.