I have this piece of code:

```
class Node{
public:
    Square square;
    Node *NW;
    Node *NE;
    Node *SW;
    Node *SE;

};

int main()
{
    Square s(2,3,1);
    Node *root;

    root->square=s;
    cout<<root->square.length();

}

```

Square is a class I created. But when I run this code I get segmentation fault 11. Basically I want to use an object of class Square, as data type of a tree, and length is a function of the square object. Why is this wrong?