Actions

EmSys

C - Structures5

From EdWiki

Revision as of 09:31, 23 June 2015 by Jshankar (Talk | contribs) (1 revision imported: EdWiki -- Emsys pages from Shukra)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Structures ...

Structures can be nested

struct RECT {
    struct POINT top;
    struct POINT bottom;
};

The RECT structure contains two POINT structures. If we declare screen as

struct RECT screen;

Then screen.top.x refers to the x coordinate of the top member of screen.