View previous topic :: View next topic |
Author |
Message |
alan
Joined: 12 Nov 2012 Posts: 357 Location: South Africa
|
[SOLVED] Prototype a struct |
Posted: Fri Oct 11, 2013 6:09 am |
|
|
Goodday All
How would one declare the structs below which are referenced in another struct, as they contain pointers to each others definition?
Code: | typedef struct TPB {
TSCR *OwnSc;
}TPRB;
typedef struct SCR {
TPRB *PrgBar;
} TSCR;
|
V5.012
Regards
Last edited by alan on Fri Oct 11, 2013 1:31 pm; edited 1 time in total |
|
|
alan
Joined: 12 Nov 2012 Posts: 357 Location: South Africa
|
|
Posted: Fri Oct 11, 2013 1:31 pm |
|
|
Answer from CCS for those that would like to know:
Code: | Like this:
typedef TSCR * pTSCR;
typedef struct TPB {
pTSCR OwnSc;
}TPRB;
typedef struct SCR {
TPRB *PrgBar;
} TSCR;
|
Regards |
|
|
|