Solved

easy! short form of "if"

Posted on 2003-12-11
1
1,592 Views
Last Modified: 2008-03-04
Hi!

real easy one...
whats the short form of "if"...

i know its something like
onebit (zh == 0) ? 1:0;

regards
0
Comment
Question by:trican
1 Comment
 

Accepted Solution

by:
megaphreak earned 25 total points
ID: 9923437
to assign the maximum of a and b to z

z = (a>b) ? a : b;

which is the same as

if (a>b)
     z = a;
else
       z=b;

0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

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. …
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

863 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now