Problem walking
User Sasutski
Submission Time 2023-08-03 20:27:31
Score 0
Max Time N/A
Max Memory N/A

Compile Error

walking.cpp: In function ‘int main()’:
walking.cpp:18:17: error: ‘getchar’ was not declared in this scope
18 | while ((c = getchar()) != ' ') {
| ^~~~~~~
walking.cpp:1:1: note: ‘getchar’ is defined in header ‘<cstdio>’; did you forget to ‘#include <cstdio>’?
+++ |+#include <cstdio>
1 | struct Person {
walking.cpp:22:14: error: ‘atoi’ was not declared in this scope
22 | length = atoi(buffer);
| ^~~~
walking.cpp:25:17: error: ‘getchar’ was not declared in this scope
25 | while ((c = getchar()) != '\n') {
| ^~~~~~~
walking.cpp:25:17: note: ‘getchar’ is defined in header ‘<cstdio>’; did you forget to ‘#include <cstdio>’?
walking.cpp:35:21: error: ‘getchar’ was not declared in this scope
35 | while ((c = getchar()) != ' ') {
| ^~~~~~~
walking.cpp:35:21: note: ‘getchar’ is defined in hea