Can structures be passed to the functions by value?

?

=?ISO-8859-1?Q?=22Nils_O=2E_Sel=E5sdal=22?=

Emmanuel said:
(e-mail address removed) a écrit :

Yes, but it's just another waste of time and memory...

Uh, that would depend on what you need to do with it.
 
R

Richard Tobin

Can structures be passed to the functions by value?
[/QUOTE]
Yes. However, a constant pointer to a structure often saves
memory and may save time.

The reverse may also be true. Small structures are often passed in
registers.

-- Richard
 
B

Ben Pfaff

Yes. However, a constant pointer to a structure often saves
memory and may save time.

The reverse may also be true. Small structures are often passed in
registers.[/QUOTE]

Yes, this is true. I should have qualified my statement with
"sufficiently large". Of course, nothing is guaranteed in any
case.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top