I have this piece of code wherein I want p to point to array index with value 10
struct_a {
int value;
...
}
There is an array of struct_a. finditem looks through the array to find one with value = 10;
main() {
struct_a *p;
fixup_p(p, 10);
}
void fixup_p (struct_a *p, int a) {
struct_a *check;
check = finditem(a);
p = check;
}
This doesnt work. What is the mistake here?