Article View: comp.std.c
Article #6215Re: const and struct pointers
From: Charles Hannum
Date: Sat, 24 Feb 1990 04:23
Date: Sat, 24 Feb 1990 04:23
13 lines
1082 bytes
1082 bytes
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@psuvm.{bitnet,psu.edu} "No noozzzz izzz netzzzsnoozzzzz..."
c9h@psuecl.{bitnet,psu.edu} "Mem'ry, all alone in the moonlight ..."
Technical Details
Message-ID:
<90054.232325CMH117@psuvm.psu.edu>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!usc!brutus.cs.uiuc.edu!psuvax1!psuvm!cmh117References:
<1214@watserv1.waterloo.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!usc!brutus.cs.uiuc.edu!psuvax1!psuvm!cmh117 From: CMH117@psuvm.psu.edu (Charles Hannum) Newsgroups: comp.std.c,comp.lang.c Subject: Re: const and struct pointers Message-ID: <90054.232325CMH117@psuvm.psu.edu> Date: 24 Feb 90 04:23:25 GMT References: <1214@watserv1.waterloo.edu> Distribution: all Organization: Penn State University Lines: 13