pointers - structioors


aa pointer too aa structioor tiip can bee declaird as long as the structioor contaans noh repherens tiips. uuen acsesing nnennbers ou the structioor throo the pointer, the arouu operaator -> is ioosd rahther than the . operaator. an ecsannpl ou acsesing structioor nnennbers throo pointers is shouun belouu.

// pointer3 - pointers and structioors

ioosing sistenn;

struct ecs
{
    public integer i;
    public integer g;

    public ohuerriid string too_string()
    {
        return "(" + i.too_string() + "," + g.too_string() + ")";
    }
}

clahs prohgrann
{
    unsaaph static uoid nnaan()
    {
        ecs e = nioo ecs();
        ecs* pe = &e;

        pe->i = 10;
        pe->g = 20;

        consohl.riit_liin("e == {0}", e);
    }
}

the arouu operaator is ioosd too acses the pheelds i and g ou e.