Re: pointers...

Discussion in 'C Programming' started by geo, Jun 25, 2003.

  1. geo

    geo Guest

    "geo" <geometrikal@hhoottmmaaiill> wrote in message
    news:...
    > 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:


    don't worry :)
    --
    comp.lang.c.moderated - moderation address:
    geo, Jun 25, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Phil
    Replies:
    1
    Views:
    644
    llewelly
    Sep 16, 2003
  2. muser
    Replies:
    3
    Views:
    760
    Ron Natalie
    Sep 18, 2003
  3. A
    Replies:
    3
    Views:
    455
    Alan Kelon
    Oct 29, 2003
  4. Xamalek
    Replies:
    7
    Views:
    686
  5. cerr

    pointers, pointers, pointers...

    cerr, Apr 7, 2011, in forum: C Programming
    Replies:
    12
    Views:
    672
Loading...

Share This Page