c - redefinition; previous definition was 'typedef' error -


i got following error:

error c2365: 'decimal' : redefinition; previous definition 'typedef'

for following definition in header file:

enum data_type {decimal, hexa, string}; 

i understood error occur duplicate definitions, there isn't known defintion that, , there aren't including files in header file.

which other reasons can cause error?

somewhere in included header files, or files include ad infinitum, there definition of decimal typedef.

do not go looking it! well, if want aren't going able it. rename enum sensible dt_decimal.

if want keep using decimal , avoid error there 2 strategies. 1 use namespaces, put names different namespace other pesky definition.

the other (old school) way use masking macro definition.


Comments

Popular posts from this blog

PHPMotion implementation - URL based videos (Hosted on separate location) -

javascript - Using Windows Media Player as video fallback for video tag -

c# - Unity IoC Lifetime per HttpRequest for UserStore -