Solved

easy! short form of "if"

Posted on 2003-12-11
1
1,591 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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

This article will show you some of the more useful Standard Template Library (STL) algorithms through the use of working examples.  You will learn about how these algorithms fit into the STL architecture, how they work with STL containers, and why t…
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 additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
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.

760 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

21 Experts available now in Live!

Get 1:1 Help Now