I
ir1979
Hi there,
I want to declare an array whose size can be calculated in compile
time. But I as a busy programmer (!) want the compiler to do so. For
example in the following code:
#define N 20 //max number of nodes
#define M 10 //max number of alphabets
int main()
{
const long p2n = pow(2,N)-1;
char f [p2n][p2n][M+1]={0};
}
,how can I say the compiler that p2n is a constant that can be
evaluated in compile time (that's like a simple constant).
Thanks.
I want to declare an array whose size can be calculated in compile
time. But I as a busy programmer (!) want the compiler to do so. For
example in the following code:
#define N 20 //max number of nodes
#define M 10 //max number of alphabets
int main()
{
const long p2n = pow(2,N)-1;
char f [p2n][p2n][M+1]={0};
}
,how can I say the compiler that p2n is a constant that can be
evaluated in compile time (that's like a simple constant).
Thanks.