Solved

Invert a boolean value

Posted on 2006-11-12
1
204 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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

What is C++ STL?: STL stands for Standard Template Library and is a part of standard C++ libraries. It contains many useful data structures (containers) and algorithms, which can spare you a lot of the time. Today we will look at the STL Vector. …
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

785 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