Hello
I have very little programming experience with C++. I have something like this:
Code:
bool MYFUNC( const unsigned *N, double *prob, double *corr )
{
bool flag = false;
printf( "%u ; %f ; %f\n" , *N , *prob , *corr );
double ma[ *N ] = {0.0}; // ERROR
// other things
return( flag );
}
int main()
{
const unsigned n = 9;
static double p = 0.5;
static double c = 0.1;
MYFUNC ( &n , &p , &c );
}
I want to pass three pointers to MYFUNC and in it initialize a array of size N called "ma". This produces an error. Why? Actially I want to initialize an array of size (N+1).
Thanks for you help
Serge