let's say I have this global struct
struct input_shift_register
{
bool not_used;
int data;
int *ptr_to_data;
};
and I would want to pass an instance of it in a function to modify its data
void share_data(input_shift_register shift) {
shift.data = 5;
}
This will only modify the local copy of the struct inside the function. How can I modify the "real" global struct instead? I am sorry this is probably very easy but I just can't find an answer online.