String with number as Variable , Unix C question [closed]
I want to use abc1 ,abc2, abc3,abc4,..abc100,as struct variable name. But I don't know how to set this? have no idea.
Can anybody help me out? Thanks indeed.
It sounds like you're looking for an array.
typedef struct {
/* ... */
} whatever;
whatever abc[100];
abc[0] = xxx;
abc[3] = yyy;
精彩评论