[英]Qt QVector - can I change by reference a value in an element?
I have a 我有一个
QVector<structure> m_vector;
the structure has many fields, some of them fixed-dimension and some of them other dynamic QVectors.. 该结构具有许多字段,其中一些是固定尺寸的,而另一些是动态QVectors。
I'm wondering if I can do this: 我想知道是否可以做到这一点:
m_vector[4].another_vector[9].another_vector[2].field_in_the_structure = 2;
will the change be valid to the entire m_vector? 更改对整个m_vector有效吗?
是的,这应该可以按照您期望的方式工作。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.