I have the following C code.

It is supposed to create a house type and a room type. However It seems the room type is not being recognised because I can't create functions of type room.

After the code is the compiler error. 

```
#include <stdlib.h>
#include <stdio.h>

//create type Room.
struct Room
{
    float width;
    float length;
    float height;
    char *name;
};

//create type House.
struct House
{
    char *address;
    /*Rooms in house are an array of pointers. Each pointer to a Room.*/
    struct Room *rooms[10];
};

//protype functions.
void printHouse (struct House house);
Room createRoom(char *name, float width, float length, float height);

int main()
{
    //create house h.
    struct House h;
    h.address = "10 Palace Road";
    for (int i = 0; i < 10; i++)
        h.rooms[i] = NULL;

    //create a room (hall) without use of createRoom. Successful.
    struct Room hall;
    hall.width = 10;
    hall.length = 12;
    hall.height = 9;
    hall.name = "Hall";

    h.rooms[0] = &hall;
    h.rooms[1] = &createRoom("lounge", 20, 20, 9);

    printHouse(h);

    return 0;
}

Room createRoom(char *name, float width, float length, float height)
{
    struct Room r;
    r.width = width;
    r.length = length;
    r.height = height;
    r.name = name;

    return r;
}

//prints contents of the house. Working okay.
void printHouse (struct House house)
{
printf("%s",house.address);
printf("\n\r\n\r");
for (int i=0; i<10; i++)
{
    if (house.rooms[i] != NULL)
    {
        struct Room r = *house.rooms[i];
        printf("Room #%d: %s", i, r.name);
    }
}

}

```

I am getting the following, that I don't know how to fix, during compile. Could anyone tell me what to do here and tell me why Room is not being recognised as a type?. 

```
gcc -std=c99 -c -Wall -ggdb   -c -o struct.o struct.c
struct.c:24:1: error: unknown type name ‘Room’
struct.c: In function ‘main’:
struct.c:40:15: error: lvalue required as unary ‘&’ operand
struct.c: At top level:
struct.c:49:1: error: unknown type name ‘Room’
struct.c: In function ‘createRoom’:
struct.c:57:2: error: incompatible types when returning type ‘struct Room’ but ‘int’ was expected
struct.c:58:1: warning: control reaches end of non-void function [-Wreturn-type]
make: *** [struct.o] Error 1

```