Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
| From | James Kuyper <jameskuyper@verizon.net> |
|---|---|
| Newsgroups | comp.lang.c |
| Subject | Re: passing a pointer to initialized structrue in a function |
| Date | 2012-03-02 13:53 -0500 |
| Organization | A noiseless patient Spider |
| Message-ID | <4F511731.5010802@verizon.net> (permalink) |
| References | <30546693.434.1330702765903.JavaMail.geo-discussion-forums@pbfa4> <4F50F91C.2070301@verizon.net> <0.5ddcb5df8d3f9eb55b71.20120302170212GMT.87pqcvhr6z.fsf@bsb.me.uk> |
On 03/02/2012 12:02 PM, Ben Bacarisse wrote: > James Kuyper <jameskuyper@verizon.net> writes: > >> On 03/02/2012 10:39 AM, ArifulHossain tuhin wrote: > <snip> >>> my_ds * ds = (my_ds *)malloc(sizeof(my_ds)); ... >> ds object of type my_ds, and &ds is a pointer to that object. > > You've missed a level of indirection (or maybe just several words got > lost from the sentence). I did lose a level of indirection (without, oddly enough, invalidating my conclusion). I posted a correction to my code, but I should have corrected the text, too: "ds is pointer to an object of type my_ds, and &ds is a pointer to that pointer."
Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
passing a pointer to initialized structrue in a function ArifulHossain tuhin <etothepowerpi@gmail.com> - 2012-03-02 07:39 -0800
Re: passing a pointer to initialized structrue in a function ArifulHossain tuhin <etothepowerpi@gmail.com> - 2012-03-02 07:44 -0800
Re: passing a pointer to initialized structrue in a function James Kuyper <jameskuyper@verizon.net> - 2012-03-02 11:26 -0500
Re: passing a pointer to initialized structrue in a function James Kuyper <jameskuyper@verizon.net> - 2012-03-02 11:45 -0500
Re: passing a pointer to initialized structrue in a function James Kuyper <jameskuyper@verizon.net> - 2012-03-02 11:47 -0500
Re: passing a pointer to initialized structrue in a function Ben Bacarisse <ben.usenet@bsb.me.uk> - 2012-03-02 17:02 +0000
Re: passing a pointer to initialized structrue in a function James Kuyper <jameskuyper@verizon.net> - 2012-03-02 13:53 -0500
Re: passing a pointer to initialized structrue in a function Ike Naar <ike@iceland.freeshell.org> - 2012-03-02 17:25 +0000
Re: passing a pointer to initialized structrue in a function cri@tiac.net (Richard Harter) - 2012-03-02 19:40 +0000
csiph-web