[讨论] struct a.b([1:5]).c=1; 为什么错?

楼主: s4300026 (s4300026)   2015-06-29 17:34:40
如题
我想要做到
a.b(1).c = 1
a.b(2).c = 1
a.b(3).c = 1
a.b(4).c = 1
a.b(5).c = 1
就很顺手的打
a.b([1:5]).c=1;
然后就得到
Insufficient outputs from right hand side to
satisfy comma separated list expansion on left hand
side. Missing [] are the most likely cause.
该怎么改成正确呢?
作者: celestialgod (天)   2015-06-29 17:36:00
field不能这样操作
楼主: s4300026 (s4300026)   2015-06-29 17:41:00
所以此题无解 只能用for了?
作者: celestialgod (天)   2015-06-29 17:47:00
用cell转比较快看下面回文

Links booklink

Contact Us: admin [ a t ] ucptt.com