log2 not found in my math.h?

后端 未结 5 900
野的像风
野的像风 2020-12-01 15:25

I\'m using a fairly new install of Visual C++ 2008 Express.

I\'m trying to compile a program that uses the log2 function, which was found by including using Eclipse

5条回答
  •  攒了一身酷
    2020-12-01 16:28

    log2() is only defined in the C99 standard, not the C90 standard. Microsoft Visual C++ is not fully C99 compliant (heck, there isn't a single fully C99 compliant compiler in existence, I believe -- not even GCC fully supports it), so it's not required to provide log2().

提交回复
热议问题