Seems like a very silly question, but i am unable to find an answer on this online.
basically what i am confused about is what does this code mean:
int x = y , z;
Why x has two values, separated by comma?
It's the same like :
int x = y;
int z;
x
没有两个值,它具有y
值,并且还有另一个int
变量z
。
Those are two separate statements.The first expression x= y is an assignment operation. It assigns the value y to x. The second statement is initialization of z. For this to work, the value y should have been initialized before.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.