koala.cpp: In function 'void playRound(int*, int*)':
koala.cpp:11:16: error: 'N' was not declared in this scope
for (i=0;i<N;++i) {
^
koala.cpp:12:37: error: 'W' was not declared in this scope
if ( !(B[i] >= 0 && B[i] <= W) ) {
^
koala.cpp:13:13: error: 'printf' was not declared in this scope
printf("Invalid query.\n");
^~~~~~
koala.cpp:13:13: note: suggested alternative: 'int'
printf("Invalid query.\n");
^~~~~~
int
koala.cpp:14:13: error: 'exit' was not declared in this scope
exit(0);
^~~~
koala.cpp:18:13: error: 'W' was not declared in this scope
if (S > W) {
^
koala.cpp:19:9: error: 'printf' was not declared in this scope
printf("Invalid query.\n");
^~~~~~
koala.cpp:19:9: note: suggested alternative: 'int'
printf("Invalid query.\n");
^~~~~~
int
koala.cpp:20:9: error: 'exit' was not declared in this scope
exit(0);
^~~~
koala.cpp:23:5: error: 'numQueries' was not declared in this scope
numQueries++;
^~~~~~~~~~
koala.cpp:24:22: error: 'maxQueries' was not declared in this scope
if (numQueries > maxQueries) {
^~~~~~~~~~
koala.cpp:25:9: error: 'printf' was not declared in this scope
printf("Too many queries.\n");
^~~~~~
koala.cpp:25:9: note: suggested alternative: 'int'
printf("Too many queries.\n");
^~~~~~
int
koala.cpp:26:9: error: 'exit' was not declared in this scope
exit(0);
^~~~
koala.cpp:38:16: error: 'N' was not declared in this scope
for (i=0;i<N;++i) {
^
koala.cpp:42:21: error: 'W' was not declared in this scope
for (j=0;j<=W;++j) {
^
koala.cpp:47:16: error: 'W' was not declared in this scope
for (j=W;j>=v;--j) {
^
koala.cpp:48:37: error: 'P' was not declared in this scope
int h = cache[o][j-v] + P[i];
^
koala.cpp:60:15: error: 'W' was not declared in this scope
int cur = W;
^
koala.cpp:61:12: error: 'N' was not declared in this scope
for (i=N-1;i>=0;--i) {
^
koala.cpp: In function 'void runGame(int)':
koala.cpp:70:20: error: 'N' was not declared in this scope
scanf("%d %d",&N,&W);
^
koala.cpp:70:23: error: 'W' was not declared in this scope
scanf("%d %d",&N,&W);
^
koala.cpp:70:5: error: 'scanf' was not declared in this scope
scanf("%d %d",&N,&W);
^~~~~
koala.cpp:72:21: error: 'P' was not declared in this scope
scanf("%d",&P[i]);
^
koala.cpp:75:5: error: 'numQueries' was not declared in this scope
numQueries = 0;
^~~~~~~~~~
koala.cpp:77:9: error: 'printf' was not declared in this scope
printf("%d\n", minValue(N, W));
^~~~~~
koala.cpp:77:9: note: suggested alternative: 'int'
printf("%d\n", minValue(N, W));
^~~~~~
int
koala.cpp:79:9: error: 'printf' was not declared in this scope
printf("%d\n", maxValue(N, W));
^~~~~~
koala.cpp:79:9: note: suggested alternative: 'int'
printf("%d\n", maxValue(N, W));
^~~~~~
int
koala.cpp:81:9: error: 'printf' was not declared in this scope
printf("%d\n", greaterValue(N, W));
^~~~~~
koala.cpp:81:9: note: suggested alternative: 'int'
printf("%d\n", greaterValue(N, W));
^~~~~~
int
koala.cpp:86:13: error: 'printf' was not declared in this scope
printf("%d ",userP[i]);
^~~~~~
koala.cpp:86:13: note: suggested alternative: 'int'
printf("%d ",userP[i]);
^~~~~~
int
koala.cpp:88:9: error: 'printf' was not declared in this scope
printf("\n");
^~~~~~
koala.cpp:88:9: note: suggested alternative: 'int'
printf("\n");
^~~~~~
int
koala.cpp:90:5: error: 'printf' was not declared in this scope
printf("Made %d calls to playRound.\n", numQueries);
^~~~~~
koala.cpp:90:5: note: suggested alternative: 'int'
printf("Made %d calls to playRound.\n", numQueries);
^~~~~~
int
koala.cpp: In function 'void grader()':
koala.cpp:97:5: error: 'scanf' was not declared in this scope
scanf("%d %d",&F,&G);
^~~~~
koala.cpp: In function 'int allValues(int, int, int*)':
koala.cpp:137:5: error: ambiguating new declaration of 'int allValues(int, int, int*)'
int allValues(int n, int w, int *P) {
^~~~~~~~~
In file included from koala.cpp:1:0:
koala.h:9:6: note: old declaration 'void allValues(int, int, int*)'
void allValues(int N, int W, int *P);
^~~~~~~~~
koala.cpp: At global scope:
koala.cpp:93:13: warning: 'void grader()' defined but not used [-Wunused-function]
static void grader() {
^~~~~~