I would, but it requires you help yourself, too. read up on skope. Second, as I suggested before, use new to create your array. You don't need to define it at compile-time, if you store it on the heap. HTH.
Thanks, Tyler Littlefield email: [EMAIL PROTECTED] web: tysdomain-com Visit for quality software and web design. skype: st8amnd2005 ----- Original Message ----- From: Miguel Caro To: [email protected] Sent: Monday, October 20, 2008 7:41 PM Subject: [c-prog] Please help again, bidimensional dynamic array as a global variable Hello everybody,(Hello Tyler) Well, some days ago, i was asking about how to define a bidimensional dynamic array as a global variable to use as incoming variable in a function, but i could not solve the problem. Let us see , for example in a part of a programm my problem: #include<iostream> ... using namespace std; float a[10][10];//in this place i wish define a bidimenional dynamic array agian: how to do it? ... //follow the function float suma(int k, float a[][10]) { float s=0; for (int i=1;i<k;i++) for (int j =1;j<k;j++) s=s+a[i][j]; return (s); } int main() { ... suma(k,a); ... } But instead defining an static bidimensional array a[10][10], to use after as an incoming variable in a function, i wish to define it as dynamic array(to work with a huge array for example(a[500][500]) ) would you like to help me? -- View this message in context: http://www.nabble.com/Please-help-again%2C-bidimensional-dynamic-array-as-a-global-variable-tp20082005p20082005.html Sent from the C-prog mailing list archive at Nabble.com. [Non-text portions of this message have been removed]
