[問題] comma operator(,)關於operator overloading
遇到的問題: (題意請描述清楚)
這是在C++ How to Program螞蟻本第五版中的一段話
p569的第一行中間開始
正在講address operator(&)與comma operator(,)的operator overloading
"The comma operator evaluate the expression to its left then the expression
to its right."
請問這段話在講comma operator什麼事情,字都看得懂,卻不明白它的意義?
若以下面來做例子
int a,b,c,*d,&e;
是不是有關係
可以請高手回答一下嗎?
希望得到的正確結果:
無
程式跑出來的錯誤結果:
無
開發平台: (例: VC++ or gcc/g++ or Dev-C++, Windows or Linux)
Dev C++
有問題的code: (請善用置底文標色功能)
--
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 114.137.88.49
→
12/27 23:57, , 1F
12/27 23:57, 1F
→
12/28 00:00, , 2F
12/28 00:00, 2F
→
12/28 00:01, , 3F
12/28 00:01, 3F
推
12/28 17:02, , 4F
12/28 17:02, 4F
→
12/28 17:05, , 5F
12/28 17:05, 5F
推
12/28 17:51, , 6F
12/28 17:51, 6F
→
12/28 17:51, , 7F
12/28 17:51, 7F
推
12/28 17:57, , 8F
12/28 17:57, 8F