![]() |
| | #1 |
| Registered User Join Date: Mar 2003
Posts: 1
| can anyone help,,, I need to return an array of structures from a function after I handle it and change it... so my function accepts the array of structures as an argument and I want to return it... please help ... |
| manolo21 is offline | |
| | #2 |
| Skunkmeister Join Date: Aug 2001
Posts: 2,572
| arrays are automatically passed by reference. Any changes you make to the array in the function will be reflected back to the calling function.
__________________ Free the weed!! Class B to class C is not good enough!! And the FAQ is here :- http://faq.cprogramming.com/cgi-bin/smartfaq.cgi |
| Stoned_Coder is offline | |
| | #3 | |
| Open to suggestions Join Date: Mar 2003
Posts: 204
| Quote:
Code: struct T *f(struct T *t)
{
/* ... */
return t;
}
| |
| Brighteyes is offline | |
![]() |
| Thread Tools | |
| Display Modes | |
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Doubt regarding C structures and arrays. Quick suggestions please | cyrux | C Programming | 3 | 05-09-2009 11:06 AM |
| problem with arrays and structures | gell10 | C++ Programming | 7 | 11-03-2003 12:02 AM |
| Functions returning char arrays | turmoil | C Programming | 3 | 05-27-2003 01:43 AM |
| Returning Arrays | mr_spanky202 | C Programming | 2 | 04-06-2003 02:57 PM |