cannot appear in a constant-expression
-
30-10-2019 - |
Question
In the following c++ program:
static const int row = (dynamic_cast<int>(log(BHR_LEN*G_PHT_COUNT)/log(2)));
static const int pht_bits = ((32*1024)/(G_PHT_COUNT * G_PHT_COUNT * BHR_LEN));
unsigned char tab[pht_bits][1<<row];
I get the error message double log(double)’ cannot appear in a constant-expression. why am I getting this problem since i have put an integer cast in front? How should i fix this?
No correct solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow