Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Passing multidimensional arrays to functions and back

Status
Not open for further replies.

pigsie

Programmer
Dec 19, 2000
307
GB
Hi

I have a multidimensional array which I would like to be able to access from anywhere in my program. I also have a variable that I need to be able to access from anywhere in my program. I've tried passing the array from function to function but i get an error.

Thanks
 
First of all declare your variable as global (as CWinApp object).
Then, for passing of multidimensional arrays to a function check the way main() functions work with their argv and argc params, as a starting point.
Code:
void main(int argc,char *argv[]);
argv is a 2 dimensional char array. [red]Nosferatu[/red]
We are what we eat...
There's no such thing as free meal...
once stated: methane@personal.ro
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top