Hello everybody,
i am asking about how to define a bidimensional dynamic array as a global variable to use as incoming variable in a function
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?
Bye .
Miguel.