troubleshooting Question

Need some help to C++ if statement to catch the -0.01 to -0.99

Avatar of Thomas Stockbruegger
Thomas StockbrueggerFlag for Germany asked on
C++* MFC
11 Comments5 Solutions105 ViewsLast Modified:
Need some help to C++ if Statement.
I will not catch the -0.01 to -0.99 with this if statement.
The crText will be blue and not red
prozent= double variable
                  
                   if(prozent<0)
                   {
                          crText = RGB(255,0,0);      //red
                     }
                   else
                   {
                         crText = RGB(0,0,255);      //blue
                     }
Please let me know how I can fix this simple statement.
Thank you.
Best regards,
Thomas
ASKER CERTIFIED SOLUTION
ste5an
Senior Developer

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 5 Answers and 11 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 5 Answers and 11 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros