new types may not be defined in a return type

Feb 24, 2010 at 5:17am


1
2
3
4
5
6
7
8
9
10
11
12
struct state {
       int M_count;
       int C_count;
       bool boat;
       }
int hn (struct state st){
    struct state temp;
    temp = st;
    int tot =  temp.M_count + temp.C_count;
    int hr = 2*tot - 3;
    return hr;
    }


its giving error
new types may not be defined in a return type


what is the problem with my function?Please reply!
Feb 24, 2010 at 5:24am
You are missing a ; on the end of your struct.
Feb 24, 2010 at 5:55am
you are awesome!
Topic archived. No new replies allowed.