Welcome to SO C++ forum. Your question is OK, it touches on C++ "standard" vs compilers "de-facto standards" issue. In this instance the later prevails.
I will be so bold to present variant of your code transformed into standard C++
// g++ prog.cc -Wall -Wextra -std=c++17
#include <iostream>
#include <cstdlib>
// this will not compile
// #define TIMEOUT_MS = 10000
// this will
// #define TIMEOUT_MS 10000
// but avoid macros whenever you can
// constexpr guarantees compile time values
constexpr
auto TIMEOUT_MS{ 10000U } ;
// always use namespaces to avoid name clashes
namespace igor {
// 'struct' is comfortable choice for private types
// 'final' makes for (even) more optimizations
struct data final
{
// standard C++ generates this for you
// data() { }
// do not start a name with underscore
// https://stackoverflow.com/a/228797/10870835
constexpr static auto timeout_ = TIMEOUT_MS / 1000U ;
}; // data
} // igor ns
int main( int , char * [] )
{
using namespace std ;
// for time related computing use <chrono>
cout << boolalpha << igor::data::timeout_ << " s (perhaps)" << endl;
return 42 ;
}
Whenever you can post the link to your (short!) code that compiles and runs or just show the problem.
I use wandbox : https://wandbox.org/permlink/Fonz5ISoOL1KNJqe
Enjoy the standard C++.