Need a sanity check here, 99% sure this is OK but need to eliminate the last 1%. :)
I have a character value in a struture
I need to pass it to a function that will modify it, so I did the following:
void ModifyCharField(char *PtrC)
ModifyCharField(&MyStructure->MyCharField); // I'm working with a ptr to a structure.
So, first question:
Is the methodology above correct....that is passing the ADDRESS of the char in the call, and using a charpointer (like I would for a string) in the function header?
Now, part two.
I then need to pass PtrC (the charponiter) to a generic input function that accepts a void ptr. I said:
get_input(PtrC);// /I don't use the & to take the address since this is already a ptr.
Is THIS methodology (not using the address of PtrC) correct?