So,I still didn't found a proper way of doing this:
Code: Select all
C code example
struct test
{
int a,b,c;
};
void set_All_one(test *X)
{
X->a = 1;
X->b = 1;
X->c = 1;
}
void main(){
test X;
set_All_one(&X);
printf("%d %d %d",X->a, X->b, X->c); //output : 1 1 1
}
