u/Fabulous_Ad4022

Is there a way to iterate through Struct contents?

I'm planning to write an INI parser in C, so I was thinking about the user providing a struct like:

typedef struct
{
  int nt;
  float dt;
  int dx;
} config_t;

and iterating throught the struct to map each member to a parameter in the INI file.

Is that possible?

reddit.com
u/Fabulous_Ad4022 — 8 days ago