Can someone point me in the right direction? I'm a beginner but i'll try to explain this the as best as I can. How can I edit specific fields from my struct in different elements of an array through a function?
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
typedefstruct
{
int x;
int y;
int z;
}thing;
thing arr[10];
SomeFunction(&arr);
void SomeFunction(thing *obj)
{
obj[0].x = 100; //Change the x value in the first element of my array?
obj[1].x = 200;
obj[2].x = 300;
}