[ create a new paste ] login | about

Link: http://codepad.org/TmCoO6KJ    [ raw code | output | fork ]

C, pasted on Nov 22:
1
2
3
4
5
6
7
void swap(struct ptD3 *arr, int i, int j)
{
     struct ptD3 temp;
     temp=arr[i];
     arr[i]=arr[j];
     arr[j]=temp;
}


Output:
1
2
3
4
5
6
7
8
9
10
11
12
Line 1: warning: 'struct ptD3' declared inside parameter list
Line 1: warning: its scope is only this definition or declaration, which is probably not what you want
In function 'swap':
Line 3: error: storage size of 'temp' isn't known
Line 4: error: invalid use of undefined type 'struct ptD3'
Line 4: error: dereferencing pointer to incomplete type
Line 5: error: invalid use of undefined type 'struct ptD3'
Line 5: error: dereferencing pointer to incomplete type
Line 5: error: invalid use of undefined type 'struct ptD3'
Line 5: error: dereferencing pointer to incomplete type
Line 6: error: invalid use of undefined type 'struct ptD3'
Line 6: error: dereferencing pointer to incomplete type


Create a new paste based on this one


Comments: