/in/foo.cc:10:7: error: 'n' was not declared in this scope
}flow[n+1];
^
/in/foo.cc:12:8: error: 'n' was not declared in this scope
int be[n+1];
^
/in/foo.cc:13:7: error: 'n' was not declared in this scope
int v[n+1];
^
/in/foo.cc: In function 'int main()':
/in/foo.cc:22:7: error: expected unqualified-id before '[' token
flow[num].be = c;
^
/in/foo.cc:23:7: error: expected unqualified-id before '[' token
flow[num].v = v;
^
/in/foo.cc:28:3: error: 'be' was not declared in this scope
be[i] = vv*flow[num].be;
^~
/in/foo.cc:28:18: error: expected primary-expression before '[' token
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:29:22: error: expected primary-expression before '[' token
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]);
^~