/in/foo.cc: In function 'int main()':
/in/foo.cc:15:15: error: 'sort' was not declared in this scope
sort(a,length);
^
/in/foo.cc:19:23: error: 'pop' was not declared in this scope
tmp+=pop(a,length--);
^
/in/foo.cc:22:22: error: 'push' was not declared in this scope
push(a,length++,tmp);
^
/in/foo.cc: At global scope:
/in/foo.cc:30:16: error: expected ',' or '...' before 'arr'
int sort(int[] arr,int length) {
^~~
/in/foo.cc: In function 'int sort(int*)':
/in/foo.cc:31:13: error: 'length' was not declared in this scope
for (int i=length-1/2;i>=0;i++) {
^~~~~~
/in/foo.cc:32:8: error: 'arr' was not declared in this scope
sink(arr,i,length-1);
^~~
/in/foo.cc:32:22: error: 'sink' was not declared in this scope
sink(arr,i,length-1);
^
/in/foo.cc: At global scope:
/in/foo.cc:37:15: error: expected ',' or '...' before 'arr'
int pop(int[] arr, int length ) {
^~~
/in/foo.cc: In function 'int pop(int*)':
/in/foo.cc:38:15: error: 'arr' was not declared in this scope
int result = arr[0];
^~~
/in/foo.cc:39:15: error: 'length' was not declared in this scope
arr[0] = arr[length-1];
^~~~~~
/in/foo.cc: At global scope:
/in/foo.cc:44:16: error: expected ',' or '...' before 'arr'
int push(int[] arr,int length,int val) {
^~~
/in/foo.cc: In function 'int push(int*)':
/in/foo.cc:45:2: error: 'arr' was not declared in this scope
arr[length]=val;
^~~
/in/foo.cc:45:6: error: 'length' was not declared in this scope
arr[length]=val;
^~~~~~
/in/foo.cc:45:14: error: 'val' was not declared in this scope
arr[length]=val;
^~~
/in/foo.cc:47:1: warning: no return statement in function returning non-void [-Wreturn-type]
}
^
/in/foo.cc: At global scope:
/in/foo.cc:50:16: error: expected ',' or '...' before 'arr'
int sink(int[] arr,int k,int n) {
^~~
/in/foo.cc: In function 'int sink(int*)':
/in/foo.cc:51:10: error: 'k' was not declared in this scope
while(2*k+1<=n) {
^
/in/foo.cc:51:15: error: 'n' was not declared in this scope
while(2*k+1<=n) {
^
/in/foo.cc:53:13: error: 'arr' was not declared in this scope
if(j<n && arr[j+1]<arr[j]) {
^~~
/in/foo.cc:56:8: error: 'arr' was not declared in this scope
swap(arr,k,j);
^~~
/in/foo.cc: At global scope:
/in/foo.cc:62:16: error: expected ',' or '...' before 'arr'
int swap(int[] arr,int a,int b) {
^~~
/in/foo.cc: In function 'int swap(int*)':
/in/foo.cc:63:11: error: 'arr' was not declared in this scope
int temp=arr[a];
^~~
/in/foo.cc:63:15: error: 'a' was not declared in this scope
int temp=arr[a];
^
/in/foo.cc:64:13: error: 'b' was not declared in this scope
arr[a]=arr[b];
^