small bool problem



 DEVELOP > c-Plus-Plus > small bool problem

LINK TO THIS PAGE  


rating :  0   |  0


  Page 1 of 1

1

 
Topic: DEVELOP > c-Plus-Plus
User: ""
Date: 16 Jan 2008 10:53:25 PM
Object: small bool problem
http://paste.cplusplus.se/paste.php?id=7482
When I try to compile the source I get:
warning C4804: '<=' : unsafe use of type 'bool' in operation
in Visual Express. I'm a newbie when it comes to programming and I'm
not even sure what exactly "bool" does, it's a type if I understand it
correctly.
All help is appreciated! Thx!
.

User: "Barry"

Title: Re: small bool problem 16 Jan 2008 10:57:09 PM
wrote:

http://paste.cplusplus.se/paste.php?id=7482

When I try to compile the source I get:

warning C4804: '<=' : unsafe use of type 'bool' in operation

in Visual Express. I'm a newbie when it comes to programming and I'm
not even sure what exactly "bool" does, it's a type if I understand it
correctly.

All help is appreciated! Thx!

else if (19 <= bmi <= 25)
19 <= bmi && bmi <= 25
{
cout << "You have the ideal weight";
}
else if (26 <= bmi <= 30)
26 <= bmi && bmi <= 30
{
cout << "You are overweight!";
}
--
Thanks
Barry
.
User: ""

Title: Re: small bool problem 16 Jan 2008 11:12:05 PM
On 17 Jan, 05:57, Barry <dhb2...@gmail.com> wrote:

Srdja...@gmail.com wrote:

http://paste.cplusplus.se/paste.php?id=7482


When I try to compile the source I get:


warning C4804: '<=' : unsafe use of type 'bool' in operation


in Visual Express. I'm a newbie when it comes to programming and I'm
not even sure what exactly "bool" does, it's a type if I understand it
correctly.


All help is appreciated! Thx!


else if (19 <= bmi <= 25)

19 <= bmi && bmi <= 25

{
cout << "You have the ideal weight";
}

else if (26 <= bmi <= 30)
26 <= bmi && bmi <= 30

{
cout << "You are overweight!";
}

--
Thanks
Barry

Thank you Barry! :>
.



  Page 1 of 1

1

 


Related Articles
 

NEWER

pg.1232     pg.940     pg.716     pg.544     pg.412     pg.311     pg.234     pg.175     pg.130     pg.96     pg.70     pg.50     pg.35     pg.24     pg.16     pg.10     pg.6     pg.3     pg.1

OLDER