/in/foo.cc: In function 'int main()':
/in/foo.cc:10:8: error: 'cin' was not declared in this scope
  while(cin>>a){
        ^
/in/foo.cc:14:10: error: invalid array assignment
    out[n]=a;
          ^
/in/foo.cc:15:4: error: 'length' was not declared in this scope
    length[n]=len;
    ^
/in/foo.cc:20:8: error: 'length' was not declared in this scope
     if(length[i]>length[j]){
        ^
/in/foo.cc:21:24: error: 'swap' was not declared in this scope
      swap(out[i],out[j]);swap(length[i].length[j]);
                        ^
/in/foo.cc:24:4: error: 'cout' was not declared in this scope
    cout<<out[i]<<endl;
    ^
/in/foo.cc:24:18: error: 'endl' was not declared in this scope
    cout<<out[i]<<endl;
                  ^
/in/foo.cc: In function 'bool duicheng(char*, int)':
/in/foo.cc:30:14: error: 'n' was not declared in this scope
   if(a[i]!=a[n-i-1]) 
              ^