foo.cpp: In function 'int main()':
foo.cpp:10:22: error: 'stdin' was not declared in this scope
freopen("in","r",stdin);
^
foo.cpp:10:27: error: 'freopen' was not declared in this scope
freopen("in","r",stdin);
^
foo.cpp:13:24: error: 'memset' was not declared in this scope
memset(f,0,sizeof f);
^
foo.cpp:20:21: error: 'scanf' was not declared in this scope
scanf("%d",&test);
^
foo.cpp:24:50: error: 'printf' was not declared in this scope
printf("%d\n",(f[n][m]-f[n][m-1]+mo) % mo);
^
foo.cpp:27:17: error: 'fclose' was not declared in this scope
fclose(stdin);
^