I want to get an iterator to struct variable to set a particular one on runtime according to enum ID. for example -
struct { char _char; int _int; char* pcha
No. C and C++ does not permit this.
You have to de the if/else or switch/case statements.