/in/foo.cc:10:14: error: array bound is not an integer constant before ']' token
}flow[max_n+1];
^
/in/foo.cc:12:15: error: array bound is not an integer constant before ']' token
int be[max_n+1];
^
/in/foo.cc:13:14: error: array bound is not an integer constant before ']' token
int v[max_n+1];
^
/in/foo.cc: In function 'int main()':
/in/foo.cc:22:3: error: 'flow' was not declared in this scope
flow[num].be = c;
^~~~
/in/foo.cc:28:3: error: 'be' was not declared in this scope
be[i] = vv*flow[num].be;
^~
/in/foo.cc:28:14: error: 'flow' was not declared in this scope
be[i] = vv*flow[num].be;
^~~~
/in/foo.cc:29:6: error: invalid types 'int[int]' for array subscript
v[i] = vv + vv*flow[num].v;
^
/in/foo.cc:33:26: error: invalid types 'int[int]' for array subscript
for(int j = m; j >= v[i]; j--) {
^
/in/foo.cc:34:34: error: invalid types 'int[int]' for array subscript
bag[j] = max(bag[j], bag[j-v[i]]+be[i]);
^
/in/foo.cc:34:37: error: 'be' was not declared in this scope
bag[j] = max(bag[j], bag[j-v[i]]+be[i]);
^~