Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

HOLY FUUUUUUUUCK POINTERS

Name: Anonymous 2011-01-24 3:15

why should I return a structure pointer rather than the structure itself

Name: Anonymous 2011-01-24 3:29

• it's smaller
• maybe you want to modify it
• what is with your title this is simple stuff

Name: Anonymous 2011-01-24 5:22

>>1
Because passing around large structures on the stack is GAY AS FUCK.

Are you malloc()ing a new structure for the person and returning?    If so an alternative method is to have them pass in a pointer to that structure then you can modify the structures contents to your heart's content, and it will be modified for the caller too.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List