C doesn't have a bool? Also VS2010 question

前端 未结 6 1825
礼貌的吻别
礼貌的吻别 2021-01-12 16:17

I\'m using VS 2010 Pro.

First, C doesn\'t have a bool type? I just have to use int with 0/1. Seems odd as most languages consider boolean a standard type.

6条回答
  •  迷失自我
    2021-01-12 16:54

    Newest C standard (C99) has bool type indeed. Just include stdbool.h and you can use it. Unfortunately MSVC does not haver proper support for C at all. Only partial C89.

提交回复
热议问题