cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
General C++ Programming
Set a bool based on conditional
Set a bool based on conditional
Nov 24, 2011 at 1:01am UTC
ausairman
(308)
Suppose I have this simple operation:
bool
is_larger = someint > 5 ? 1 : 0;
the conditional component itself, namely
someint > 5
returns a boolean, right? So, could I do this:
bool
is_larger = someint > 5;
would that work?
Nov 24, 2011 at 1:09am UTC
LBEaston
(91)
Should do
Nov 24, 2011 at 1:18am UTC
ausairman
(308)
thanks
Topic archived. No new replies allowed.