Returning more than one variable? - Help
From: ali (tj_at_raha.com)
Date: 09/23/04
- Next message: Sam: "search for a c++ function"
- Previous message: Jack Klein: "Re: [C] fwrite question"
- Next in thread: James Connell: "Re: Returning more than one variable? - Help"
- Reply: James Connell: "Re: Returning more than one variable? - Help"
- Reply: Mike Wahler: "Re: Returning more than one variable? - Help"
- Reply: Barry Schwarz: "Re: Returning more than one variable? - Help"
- Reply: TJ: "Re: Returning more than one variable? - Help"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 23 Sep 2004 01:40:20 -0400
Hi,
I have a function, which is going to dynamically create memory
allocation for an integer array using...
int *list = (int*)malloc(5*sizeof(int));
Within the same function, I have created another array dynamically,
with the same size element, and same contents, but sorted.. Hence,
int *AscList = (int*) malloc(5 * sizeof(int));
The function then returns list to the caller (in my case, main( ) ).
The problems I want to return list and AscList. Will appreciate if
somoene helped me out with the function prototype, and how i can use
it in the main function. Unfortunately, I'm not very conversant with
references and pointers.
Thanks,
Ali
- Next message: Sam: "search for a c++ function"
- Previous message: Jack Klein: "Re: [C] fwrite question"
- Next in thread: James Connell: "Re: Returning more than one variable? - Help"
- Reply: James Connell: "Re: Returning more than one variable? - Help"
- Reply: Mike Wahler: "Re: Returning more than one variable? - Help"
- Reply: Barry Schwarz: "Re: Returning more than one variable? - Help"
- Reply: TJ: "Re: Returning more than one variable? - Help"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|