Why is foreach iterating with a const reference?

后端 未结 5 1206
生来不讨喜
生来不讨喜 2021-02-19 18:59

I try to do the following:

QList a;
foreach(QString& s, a)
{
    s += \"s\";
}

Which looks like it should be legitimate but

5条回答
提交回复
热议问题