M
Mas
I have 3 different structures with each structure having the same first
member (int type). I would like every structure of type 1 to have a 1 in the
type field, every structure of type 2 to have 2 in the type field etc. I
want instances of each structure to have the type value properly
initialized, and I also want that member to be const. Basically, I want 1
member of a structure to be initialized to a value and be unchangeable. Is
there a way to do this in C?
member (int type). I would like every structure of type 1 to have a 1 in the
type field, every structure of type 2 to have 2 in the type field etc. I
want instances of each structure to have the type value properly
initialized, and I also want that member to be const. Basically, I want 1
member of a structure to be initialized to a value and be unchangeable. Is
there a way to do this in C?