Can I use a forloop to get the property names of a "struct" in C? Or would I just have make a separate list? (Just the name I am looking for)
A:
for
loops do not have the ability to enumerate struct
members in C, no. In fact, once compiled, a C program really doesn't have any concept of the member names at all, it just uses offsets from the struct pointer.
Amber
2010-06-20 17:25:20
+3
A:
You'll have to make a separate list. The C programming language doesn't have any introspection capabilities that would let you enumerate the property names of a struct.
dmazzoni
2010-06-20 17:25:31