Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > Re: pointers...

Reply
Thread Tools

Re: pointers...

 
 
geo
Guest
Posts: n/a
 
      06-25-2003
"geo" <geometrikal@hhoottmmaaiill> wrote in message
news:(E-Mail Removed)...
> hi all
>
> say if i had :
>
> struct random_struct {
> .....
> .....
> .....
> }
>
> struct random_struct random;
>
> and then i had a function which used this structure. What is the best
> programming practice:
>
> void function(struct random_struct * r) {
> .......
> }
>
> function(&random);
>
> or:
>
> void function(struct random_struct r) {
> .......
> }
>
> function(random);
>
>
> and why?
>
> Thanks
> Ross
> --
> comp.lang.c.moderated - moderation address: http://www.velocityreviews.com/forums/(E-Mail Removed)


don't worry
--
comp.lang.c.moderated - moderation address: (E-Mail Removed)
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off




Advertisments