Passing address of multidimentional array
- From: goodTweetieBird <goodTweetieBird@xxxxxxxxxxx>
- Date: Tue, 3 Jun 2008 05:36:22 -0700 (PDT)
I have an array defined in main.c and with to access it from a
function in another file preferrably using array indices but pointers
would be OK. I am not sure how to specify the function parameter or
how to index the elements via the foreign function. Would like a
little advice rather than proceeding blindly because I often find that
just because something compiles it is not necessarily correct.
Thanks,
gtb
~~~~~~~~~~~~~~~
int arr[20][30];
main(int argc, char** argv)
{
int rval;
...
rval = functionInOtherFile(arr);
}
//Other file here.
int functionInOtherFile( int* arr[}[])
{
//???
}
.
- Follow-Ups:
- Re: Passing address of multidimentional array
- From: Doug Harrison [MVP]
- Re: Passing address of multidimentional array
- From: Ron Francis
- Re: Passing address of multidimentional array
- From: Ulrich Eckhardt
- Re: Passing address of multidimentional array
- From: Igor Tandetnik
- Re: Passing address of multidimentional array
- From: Victor Bazarov
- Re: Passing address of multidimentional array
- Prev by Date: Re: How to create Windows forms like in VB using VC++6?
- Next by Date: Re: Passing address of multidimentional array
- Previous by thread: How to create Windows forms like in VB using VC++6?
- Next by thread: Re: Passing address of multidimentional array
- Index(es):
Relevant Pages
|