/in/foo.cc:2:23: error: 'sum' has not been declared
int gethe(int m,int n,sum s);
^~~
/in/foo.cc: In function 'int main()':
/in/foo.cc:28:27: error: invalid conversion from 'sum*' to 'int' [-fpermissive]
{if(2*s[i].h<=gethe(i,n,s))
^
/in/foo.cc:2:5: note: initializing argument 3 of 'int gethe(int, int, int)'
int gethe(int m,int n,sum s);
^~~~~
/in/foo.cc: In function 'int gethe(int, int, sum)':
/in/foo.cc:42:17: error: no match for 'operator[]' (operand types are 'sum' and 'int')
count=count+2*s[i].k;
^