Solved

easy! short form of "if"

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

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

Errors will happen. It is a fact of life for the programmer. How and when errors are detected have a great impact on quality and cost of a product. It is better to detect errors at compile time, when possible and practical. Errors that make their wa…
Introduction This article is the first in a series of articles about the C/C++ Visual Studio Express debugger.  It provides a quick start guide in using the debugger. Part 2 focuses on additional topics in breakpoints.  Lastly, Part 3 focuses on th…
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 how to clear a vector as well as how to detect empty vectors in C++.

786 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