14@@ -15,10 +15,10 @@
15 def write_testcode(filename):
16 with open(filename, 'w', encoding="utf8") as f:
17 f.write('''
18- #include <stdio.h>
19+ #include <cstdio>
20 int main()
21 {
22- printf("the quick brown fox jumps over the lazy god\\n");
23+ std::printf("the quick brown fox jumps over the lazy god\n");
0 std::printf("the quick brown fox jumps over the lazy god\\n");
Otherwise, it fails:
0test1.cpp:5:21: warning: missing terminating " character
1 5 | std::printf("the quick brown fox jumps over the lazy god
2 | ^
3test1.cpp:5:21: error: missing terminating " character
4 5 | std::printf("the quick brown fox jumps over the lazy god
5 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
6test1.cpp:6:1: warning: missing terminating " character
7 6 | ");
8 | ^
9test1.cpp:6:1: error: missing terminating " character
10 6 | ");
11 | ^~~
12test1.cpp: In function 'int main()':
13test1.cpp:7:9: error: expected primary-expression before 'return'
14 7 | return 0;
15 | ^~~~~~