I want to count values in a struct.
Now I want to make the size of Newbuffer the sum of all "x", that is 146. Not the size of X.
But how to sum all "x".
/Cillo
Code:
typedef struct
{
int x;
int test;
}TYPE_TEST;
TYPE_TEST My[6] ={
{16, 50},
{4, 51},
{50, 52},
{47, 53},
{10, 54},
{19, 55}
};
int Newbuffer[ ????? ]
But how to sum all "x".
/Cillo
Comment