Solved

Invert a boolean value

Posted on 2006-11-12
1
205 Views
Last Modified: 2010-04-01
I have a Tcheckbox.
If the Tcheckbox is checked, I'd like an Tedit to be disabled.

In VB I would have written it like this
Tedit.Enabled = Not Tcheckbox.value

How would I write this in C++

Arild
0
Comment
Question by:arildj78
1 Comment
 
LVL 86

Accepted Solution

by:
jkr earned 500 total points
ID: 17926630
In C++, you can do that in a similar way using the '!' (logical not) operator, e.g.

Tedit.Enabled = !Tcheckbox.value;

0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Article by: SunnyDark
This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
In days of old, returning something by value from a function in C++ was necessarily avoided because it would, invariably, involve one or even two copies of the object being created and potentially costly calls to a copy-constructor and destructor. A…
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question