Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > Can structures be passed to the functions by value?

Reply
Thread Tools

Can structures be passed to the functions by value?

 
 
srinivasaraokoneru@gmail.com
Guest
Posts: n/a
 
      10-12-2005
Can structures be passed to the functions by value?

 
Reply With Quote
 
 
 
 
pemo
Guest
Posts: n/a
 
      10-12-2005

<> wrote in message
news: oups.com...
> Can structures be passed to the functions by value?
>


Yup


 
Reply With Quote
 
 
 
 
Emmanuel Delahaye
Guest
Posts: n/a
 
      10-12-2005
a écrit :
> Can structures be passed to the functions by value?
>

Yes, but it's just another waste of time an memory...
 
Reply With Quote
 
Emmanuel Delahaye
Guest
Posts: n/a
 
      10-12-2005
a écrit :
> Can structures be passed to the functions by value?
>

Yes, but it's just another waste of time and memory...
 
Reply With Quote
 
=?ISO-8859-1?Q?=22Nils_O=2E_Sel=E5sdal=22?=
Guest
Posts: n/a
 
      10-12-2005
Emmanuel Delahaye wrote:
> a écrit :
>
>> Can structures be passed to the functions by value?
>>

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


Uh, that would depend on what you need to do with it.
 
Reply With Quote
 
Ben Pfaff
Guest
Posts: n/a
 
      10-12-2005
writes:

> Can structures be passed to the functions by value?


Yes. However, a constant pointer to a structure often saves
memory and may save time.
--
"When I have to rely on inadequacy, I prefer it to be my own."
--Richard Heathfield
 
Reply With Quote
 
Richard Tobin
Guest
Posts: n/a
 
      10-12-2005
In article <>,
Ben Pfaff <> wrote:

>> Can structures be passed to the functions by value?


>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
 
Reply With Quote
 
Ben Pfaff
Guest
Posts: n/a
 
      10-12-2005
(Richard Tobin) writes:

> In article <>,
> Ben Pfaff <> wrote:
>
>>> Can structures be passed to the functions by value?

>
>>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.


Yes, this is true. I should have qualified my statement with
"sufficiently large". Of course, nothing is guaranteed in any
case.
--
Here's a tip: null pointers don't have to be *dull* pointers!
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Big structures to be passed as values of STL map naveen C++ 1 11-24-2010 08:56 AM
structures, structures and more structures (questions about nestedstructures) Alfonso Morra C Programming 11 09-24-2005 07:42 PM
How to declare pointer to functions in structures? Mackan C++ 2 02-17-2005 05:23 AM
please help me in distinguish redefining functions, overloading functions and overriding functions. Xiangliang Meng C++ 1 06-21-2004 03:11 AM
Type Casting IPv4 and IPv6 structures to Generic Structures tweak C Programming 14 06-11-2004 02:43 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57