a.c

ldmud-3.3.719/test/t-040413/a.c · 519 B

From the archive ldmud-3.3.719.tar.gz

Download the archive   « Back to the archive contents

struct Door
{
    string flags;
};

struct Exit
{
    string flags;
};

struct Exits
{
    struct Exit up;
    struct Exit down;
};

struct Room
{
    struct Exits exit;
};

void main()
{
    struct Room room;
    string dir;

    // The in the following line the driver should be able to determine
    // that only a struct Exit could be the result of the computed lookup.

    room->exit->(dir)->flags;

    // In the following line, the & should bind less strong than the -> .
    input_to("foo", 0, &room->exit);
}

Site Stats

Snippets: 1791
Codebases: 571