C++ (Qt)QStringList l;int s = 0; for( int i = 0; i < l.count(); i++ ) s += l.at( i ).toInt();s /= l.count();
C++ (Qt)for (QStringList::const_iterator it = l.constBegin (), end = l.constEnd (); it != end; ++it) { s += it->toInt ();}
Bashfind ~/qt.stable/src -type f -name '*.[ch]*' | xargs grep 'for.*\.count()' | wc -l
C++ (Qt)inline int size() const { return d->end - d->begin; }inline int count() const { return p.size(); }