This works using Visual Studio 2013:
#include <io.h>
#include <fcntl.h>
#include <iostream>
int main( int argc, char * argv[] )
{
_setmode( _fileno( stdout ), _O_BINARY );
std::cout << std::endl;
}
It will output only [0A], and not [0D][0A].
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…