For you, which reduce my answer. Say this code does not work:
#include <stdio.h> double log(double foo) { return 1.0; } static const int row = static_cast<int>(log(4)/log(2)); int main(void) { printf("%d\n", row); return 0; }
Original (changed from (int) to static_cast, not that it matters)
static const int row = static_cast<int>(log(BHR_LEN*G_PHT_COUNT)/log(2));
source share