foo.cpp: In function 'int main()':
foo.cpp:49:23: error: 'printf' was not declared in this scope
foo.cpp:53:23: error: 'printf' was not declared in this scope
foo.cpp:58:23: error: 'printf' was not declared in this scope
foo.cpp:61:22: error: 'printf' was not declared in this scope
foo.cpp: In function 'bool check1(int)':
foo.cpp:38:1: warning: control reaches end of non-void function [-Wreturn-type]
foo.cpp: In function 'bool check(int)':
foo.cpp:22:1: warning: control reaches end of non-void function [-Wreturn-type]