[求助]关于布尔变量的问题
#include <iostream.h>
int main()
{
float dues;
cout <<"enter your dues\n";
cin >>dues;
cout <<"on time?(y/n)\n";
char yn;
cin >>yn ;
bool overdue;
overdue=(yn != 'y');
float amountdue;
if(overdue)
{
amountdue = dues*1.10 ;
}
else
{
amountdue = dues;
}
cout <<"amount due:";
cout << amountdue;
return 0;
}
这是源程序
为什么会有undefined bool错误
bool是定义布尔量的啊