fork download
  1. #include <iostream>
  2.  
  3. int main()
  4. {
  5.  
  6. std::cout << "cerr: " <<((std::cerr.flags() & std::ios::unitbuf) != 0 ? "autoflushed" : "buffered") << std::endl;
  7. std::cout << "cout: " <<((std::cout.flags() & std::ios::unitbuf) != 0 ? "autoflushed" : "buffered") << std::endl;
  8.  
  9. }
Success #stdin #stdout 0s 3296KB
stdin
Standard input is empty
stdout
cerr: autoflushed
cout: buffered