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
strange variable init
strange variable init
Mar 16, 2014 at 12:46pm UTC
collapsed
(20)
hi
i've found this type of initialization in a source of another person but i cant understand the way of an init of the type:
var1 = 2;
tot = var1,var2;
what's the behavior of this?
Mar 16, 2014 at 1:26pm UTC
MiiNiPaa
(8886)
it does
tot = var1
,
var2
is unused.
However if line looks like
int
tot = var1, var2;
It will declare integer variable
tot
with value equal to
var1
and uninitializated integer variable
var2
Topic archived. No new replies allowed.