elephants.cpp: In function 'void init(int, int, int*)':
elephants.cpp:18:8: warning: unused variable 'j' [-Wunused-variable]
int i,j,k;
^
elephants.cpp:18:10: warning: unused variable 'k' [-Wunused-variable]
int i,j,k;
^
elephants.cpp: In function 'int update(int, int)':
elephants.cpp:33:3: error: 'X' was not declared in this scope
X[0]=X[1]=y;
^
elephants.cpp:38:10: error: 'X' was not declared in this scope
if(abs(X[1]-y)>abs(X[0]-y)){
^
elephants.cpp:44:11: error: 'X' was not declared in this scope
int l = X[0];
^
elephants.cpp:46:12: error: 'N' was not declared in this scope
fori(i,1,N){
^
elephants.cpp:3:32: note: in definition of macro 'fori'
#define fori(a,b,c) for(a=b; a<c; a++)
^
elephants.cpp:47:14: error: 'L' was not declared in this scope
if(X[i]-l>L){
^