foo.cpp:6:1: error: 'define' does not name a type
define MAX 10001
^
foo.cpp: In function 'void fun()':
foo.cpp:13:7: error: 'n' was not declared in this scope
for(i=n;i>1;i--)
^
foo.cpp:14:4: error: 'a' was not declared in this scope
if(a[i-1]<a[i])
^
foo.cpp:25:12: error: 'a' was not declared in this scope
if(a[c]<a[i] )
^
foo.cpp:45:9: error: 'a' was not declared in this scope
int tem=a[c];
^
foo.cpp: In function 'int main()':
foo.cpp:55:12: error: 'n' was not declared in this scope
while(cin>>n>>m)
^
foo.cpp:55:15: error: 'm' was not declared in this scope
while(cin>>n>>m)
^
foo.cpp:58:6: error: 'a' was not declared in this scope
cin>>a[i];
^
foo.cpp:62:7: error: 'a' was not declared in this scope
cout<<a[i]<<" ";
^
foo.cpp:63:7: error: 'a' was not declared in this scope
cout<<a[i]<<endl;
^