473,221 Members | 1,574 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,221 software developers and data experts.

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!
Jan 17 '08 #1
2 5974
Sr******@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
Jan 17 '08 #2
On 17 Jan, 05:57, Barry <dhb2...@gmail.comwrote:
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! :>
Jan 17 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: mihai | last post by:
I have a situation witch is like this: // A.h class A { class AA { }; };
5
by: Huffin the Puffin | last post by:
Hiya This has to be qualified as belonging to the small problems department but never the less: I have a Swedish version of XP home. Updated with the last updates and the latest Java vm. ...
3
by: Leslie A Rhorer | last post by:
Hello all, I am quite new to HTML, and I have created a number of pages related to a project on which I am working. Several of the pages look just the way I want with the default font settings...
5
by: aeldaly | last post by:
My website (linux-place.com) is built with css and no tables or frames whatsoever. The left "frame" looks fine, unless the page needs scrolling. When I scroll down, the left "frame's" background...
9
by: anonymous | last post by:
The following program : #include <stdio.h> void func ( char * psz ) { char * sz = "func"; psz = sz; } int main() {
3
by: Vjay77 | last post by:
As a result from who is I am getting this: > > NOTICE AND TERMS OF USE: You are not authorized to access or query our WHOIS database through the use of high-volume, automated, electronic...
2
by: Luc | last post by:
I saw a few posts on this newsgroup about it but nothing to help me resolve this problem: We designed a window in .NET on a platform using small fonts (120 ppp). But this window will run on...
2
by: Gerald07 | last post by:
If ComboBox1.Text = "Manual" Then Form2.Show() End If If ComboBox1.Text = "Non-Manual" Then Form3.Show() End If If ComboBox1.Text =...
1
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
0
by: veera ravala | last post by:
ServiceNow is a powerful cloud-based platform that offers a wide range of services to help organizations manage their workflows, operations, and IT services more efficiently. At its core, ServiceNow...
0
by: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
2
by: jimatqsi | last post by:
The boss wants the word "CONFIDENTIAL" overlaying certain reports. He wants it large, slanted across the page, on every page, very light gray, outlined letters, not block letters. I thought Word Art...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.