cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
Conditional Statement Question
Conditional Statement Question
Feb 1, 2013 at 2:53pm UTC
vivre
(22)
why does the condition of if statement evaluate to true
1
2
3
4
5
6
7
8
#include <iostream>
using
namespace
std;
int
main() {
if
(3) cout <<
"It worked.\n"
; }
Last edited on
Feb 1, 2013 at 3:24pm UTC
Feb 1, 2013 at 3:12pm UTC
Lynx876
(742)
Any number other than 0 is true.
Feb 1, 2013 at 3:13pm UTC
vivre
(22)
Thanks. :)
Topic archived. No new replies allowed.