关于Linux下C语言编译器gcc不认识bool类型的问题(转)
摘要:
这几天在学习Linux下的C语言开发。今天要写一个取1到100之间质数的题。可是,当我用bool类型定义变量b,来标记一个数是否为质数时,编译出错。错误信息显示如下:'bool' undeclared (first use in this function) (Each undeclared identifier is reported only once for each function it appears in.) 在Google在搜了半天,也没不明白。后来,只得请求高手。得到回复,总结于下: C语言(或C++)里本身没有bool这种布尔类型。有些编译器可以识别,那也是 阅读全文
posted @ 2011-08-05 11:35 奋斗者 阅读(4925) 评论(0) 推荐(0)
浙公网安备 33010602011771号