File tree Expand file tree Collapse file tree 4 files changed +17
-1
lines changed
compiled_starters/cpp/src
starter_templates/cpp/src Expand file tree Collapse file tree 4 files changed +17
-1
lines changed Original file line number Diff line number Diff line change 33#include < fstream>
44
55int main (int argc, char * argv[]) {
6+ // Flush after every std::cout / std::cerr
7+ std::cout << std::unitbuf;
8+ std::cerr << std::unitbuf;
9+
610 // You can use print statements as follows for debugging, they'll be visible when running tests.
711 std::cout << " Logs from your program will appear here" << std::endl;
812
Original file line number Diff line number Diff line change 33#include < fstream>
44
55int main (int argc, char * argv[]) {
6+ // Flush after every std::cout / std::cerr
7+ std::cout << std::unitbuf;
8+ std::cerr << std::unitbuf;
9+
610 if (argc != 3 ) {
711 std::cerr << " Expected two arguments" << std::endl;
812 return 1 ;
Original file line number Diff line number Diff line change 1- @@ -1,36 +1,32 @@
1+ @@ -1,40 +1,36 @@
22 #include <cstring>
33 #include <iostream>
44 #include <fstream>
55
66 int main(int argc, char* argv[]) {
7+ // Flush after every std::cout / std::cerr
8+ std::cout << std::unitbuf;
9+ std::cerr << std::unitbuf;
10+
711- // You can use print statements as follows for debugging, they'll be visible when running tests.
812- std::cout << "Logs from your program will appear here" << std::endl;
913-
Original file line number Diff line number Diff line change 33#include < fstream>
44
55int main (int argc, char * argv[]) {
6+ // Flush after every std::cout / std::cerr
7+ std::cout << std::unitbuf;
8+ std::cerr << std::unitbuf;
9+
610 // You can use print statements as follows for debugging, they'll be visible when running tests.
711 std::cout << " Logs from your program will appear here" << std::endl;
812
You can’t perform that action at this time.
0 commit comments