foo.cpp: In function 'int main()':
foo.cpp:28:15: error: expected unqualified-id before 'this'
int i, k, this, adjacent, step, status, target;
^
foo.cpp:33:5: error: 'status' was not declared in this scope
status = 0;
^
foo.cpp:43:5: error: 'target' was not declared in this scope
target = 0;
^
foo.cpp:54:9: error: 'step' was not declared in this scope
step = queue[head][STEP];
^
foo.cpp:58:13: error: invalid use of 'this' in non-member function
this = get(status, i);
^
foo.cpp:60:17: error: 'adjacent' was not declared in this scope
adjacent = get(status, i-1);
^
foo.cpp:63:30: error: invalid use of 'this' in non-member function
set(&k, i-1, this);
^
foo.cpp:67:17: error: 'adjacent' was not declared in this scope
adjacent = get(status, i+1);
^
foo.cpp:70:30: error: invalid use of 'this' in non-member function
set(&k, i+1, this);
^
foo.cpp:74:17: error: 'adjacent' was not declared in this scope
adjacent = get(status, i-4);
^
foo.cpp:77:30: error: invalid use of 'this' in non-member function
set(&k, i-4, this);
^
foo.cpp:81:17: error: 'adjacent' was not declared in this scope
adjacent = get(status, i+4);
^
foo.cpp:84:30: error: invalid use of 'this' in non-member function
set(&k, i+4, this);
^