horses.cpp: In function 'int init(int, int*, int*)':
horses.cpp:9:14: error: expected ';' before '-' token
for (int i-1; i<N; i++) V[i] = V[i-1] * X[i];
^
horses.cpp:9:20: warning: for increment expression has no effect [-Wunused-value]
for (int i-1; i<N; i++) V[i] = V[i-1] * X[i];
~^~
horses.cpp:9:22: error: expected ')' before ';' token
for (int i-1; i<N; i++) V[i] = V[i-1] * X[i];
^
horses.cpp:9:2: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
for (int i-1; i<N; i++) V[i] = V[i-1] * X[i];
^~~
horses.cpp:9:25: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
for (int i-1; i<N; i++) V[i] = V[i-1] * X[i];
^
horses.cpp:9:25: error: 'i' was not declared in this scope
horses.cpp:12:11: warning: declaration of 'i' shadows a previous local [-Wshadow]
for(int i=e; i<N; i++) {
^
horses.cpp:9:25: note: shadowed declaration is here
for (int i-1; i<N; i++) V[i] = V[i-1] * X[i];
^
horses.cpp:12:13: error: 'e' was not declared in this scope
for(int i=e; i<N; i++) {
^
horses.cpp:13:28: error: expected ')' before 'Y'
mx = max (mx, V[i] Y[i]);
^
horses.cpp:6:38: warning: unused parameter 'Y' [-Wunused-parameter]
int init(int N, int X[], int Y[]) {
^
horses.cpp: In function 'int updateX(int, int)':
horses.cpp:19:19: warning: unused parameter 'pos' [-Wunused-parameter]
int updateX(int pos, int val) {
^~~
horses.cpp:19:30: warning: unused parameter 'val' [-Wunused-parameter]
int updateX(int pos, int val) {
^~~
horses.cpp: In function 'int updateY(int, int)':
horses.cpp:23:20: warning: unused parameter 'pos' [-Wunused-parameter]
int updateY(int pos, int val) {
^~~
horses.cpp:23:31: warning: unused parameter 'val' [-Wunused-parameter]
int updateY(int pos, int val) {
^~~