[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]

func. returning struct



hi
i have a function which returns a local structure. something like below

struct type1 func1()
{
   struct abc var1;
  .....
   return var1;
}

if i call it like

struct type1 var2;
var2 = func1();

then how the values are copied from var1 to var2.     i heard that for basic types it goes through registers, 
whereas for structs pointers are passed. 

-----------------------------
reply soon
bye

 ==== deepak ----

have a great day 
ICQ 30662394

-- If it was easy, the hardware people would take care of it.