With accessor:
```
void main()
{
    s_cell[] maze=make(5,5);
    s_cell a=maze.get(1,2);
    print_maze(maze);
}

void print_maze(s_cell[] maze)
{
}

s_cell[] make(int width, int height)
{
    return new s_cell[width*height];
}

s_cell get(s_cell[] maze, int x, int y)
{
    return maze[5*y+x]; //oops
}
```
looks like you need to store the maze width somewhere.

Reply via email to