foo.cc: In function ‘int main()’:
foo.cc:4:1: error: ‘gets’ was not declared in this scope
4 | gets(num);
| ^~~~
foo.cc:7:11: error: ‘strlen’ was not declared in this scope
7 | int len = strlen(ch);
| ^~~~~~
foo.cc:1:1: note: ‘strlen’ is defined in header ‘<cstring>’; this is probably fixable by adding ‘#include <cstring>’
+++ |+#include <cstring>
1 | int main()
foo.cc:16:1: error: ‘printf’ was not declared in this scope
16 | printf("%s", ch);
| ^~~~~~
foo.cc:1:1: note: ‘printf’ is defined in header ‘<cstdio>’; this is probably fixable by adding ‘#include <cstdio>’
+++ |+#include <cstdio>
1 | int main()