const and struct pointers
Charles Hannum
CMH117 at psuvm.psu.edu
Sat Feb 24 15:23:25 AEST 1990
The double is passed by value; so dereferencing it works fine. But the
struct is passed by reference (as are *all* structures in C!). In reality,
you need to pass a "struct qwert *" to the function. Normally, the compiler
takes the reference automatically, but you are trying to do this in reverse.
Thus, it does not work; you simply can't pass a structure by value.
Virtually,
- Charles Martin Hannum II "Klein bottle for sale ... inquire within."
(That's Charles to you!) "To life immortal!"
cmh117 at psuvm.{bitnet,psu.edu} "No noozzzz izzz netzzzsnoozzzzz..."
c9h at psuecl.{bitnet,psu.edu} "Mem'ry, all alone in the moonlight ..."
More information about the Comp.std.c
mailing list