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.