Vote count:
0
I'm working through some example code from Understanding Unix/Linux Programming (Bruce Molay). There is an array declared to hold utmp structs:
#define NRECS 16
#define NULLUT ((struct utmp *)NULL)
#define UTSIZE (sizeof(struct utmp))
static char utmpbuf[NRECS * UTSIZE];
Why would the array be declared as char and not declared as struct utmp as shown below?
static struct utmp utmpbuf[NRECS];
The actual book source is here:
asked 14 secs ago
why is an array of utmp structs defined as char in this example?
Aucun commentaire:
Enregistrer un commentaire