Article View: borland.public.cppbuilder.nativeapi
Article #3193Re: Passing structure to a fucntion by Reference vs by Value
From: Dennis Jones
Date: Mon, 24 Jul 2006 20:56
Date: Mon, 24 Jul 2006 20:56
16 lines
1644 bytes
1644 bytes
"Renald Yazmir" <renald@partmaker.com> wrote in message news:44c5268d@newsgroups.borland.com... > Hello, > Are there any problems passing structure by value to a function? > Can it be a problem for multiple recursive calls? > My structure contains 10 doubles, 1 short and char arr[6]. > Any memory restrictions? I guess I'd want to know why you would prefer to avoid passing by reference in the first place. Passing by reference (or by pointer) would almost certainly be more efficient, not to mention less likely to have an impact on recursive calls. However, having said that, since you're only talking about roughly 90 bytes, you're probably not going to run into any trouble anyway. - Dennis
Technical Details
Message-ID:
<44c533ef$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!news.glorb.com!newspeer1.de.telia.net!newspeer4.de.telia.net!de.telia.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<44c5268d@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,3cf5aff04a8c9a29 X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Dennis Jones" <nospam@nospam.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <44c5268d@newsgroups.borland.com> Subject: Re: Passing structure to a fucntion by Reference vs by Value Date: Mon, 24 Jul 2006 13:56:17 -0700 Lines: 18 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 NNTP-Posting-Host: 71.245.109.58 Message-ID: <44c533ef$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1153774575 71.245.109.58 (24 Jul 2006 13:56:15 -0700) Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!news.glorb.com!newspeer1.de.telia.net!newspeer4.de.telia.net!de.telia.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail