What is a data field?

A union that contains structures for the different event types.

Can you explain what is a data field?

The site that I'm reading this from is https://wiki.libsdl.org/SDL_Event?highlight=%28\bCategoryStruct\b%29|%28SDLStructTemplate%29

Last edited on
A field is an entry in a record. For example:
struct timeval {
time_t tv_sec; /* seconds */
suseconds_t tv_usec; /* microseconds */
};

struct timeval is a record, and tv_sec and tv_usec are fields.

My guess you want to know what a union is, but ...
No I know what a union is. I had to look it up on the site. I haven't coded in a while so I kind of forgot what everything is.

Thanks.
Topic archived. No new replies allowed.