Re: Choosing function parameter types - pointers or objects?
- From: Richard Heathfield <invalid@xxxxxxxxxxxxxxx>
- Date: Fri, 30 Jun 2006 18:49:35 +0000
ballpointpenthief said:
I know this question is a bit vague, but I was wondering about any
rules / guidelines / style issues, for when to use pointers, and when
not to, in your function parameters?
If it's a native type (int, short, long, double, that sort of thing), pass
it in raw unless you need to hack its value. Anything else - structs and
stuff - pass a pointer.
--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)
.
- Follow-Ups:
- Re: Choosing function parameter types - pointers or objects?
- From: Keith Thompson
- Re: Choosing function parameter types - pointers or objects?
- References:
- Choosing function parameter types - pointers or objects?
- From: ballpointpenthief
- Choosing function parameter types - pointers or objects?
- Prev by Date: Re: OT: Windows console programs (was Re: Function Pointers)
- Next by Date: Re: Choosing function parameter types - pointers or objects?
- Previous by thread: Choosing function parameter types - pointers or objects?
- Next by thread: Re: Choosing function parameter types - pointers or objects?
- Index(es):
Relevant Pages
|