Structures and pointers question
If I have the structure below:
Code:
10 struct
11 {
12 int cin;
13 int mo;
14 int next_step;
15 int tested_cin;
16 } coil_info;
and in SQL declare it states:
Code:
335 EXEC SQL BEGIN DECLARE SECTION;
336 coil_info coil;
337 EXEC SQL END DECLARE SECTION;
when (&coil) and (coil) is passed to functions like below what is the difference between the two?
update_coil(coil)
then using coil->cin
update_coil(&coil)
then using coil->cin
The two would have the same value correct?
One passed address of pointer and other address of the actual data? I see no difference. Any help is appreciated.