PDA

View Full Version : warning



mickey
20th July 2006, 14:16
hi do anyone explain me whay this warning?? thanks


.cpp(355) : warning C4018: '<' : signed/unsigned mismatch
QStringList values( QStringList::split( ' ', color ) );
for( int i = 0; i < values.size(); ++i ) {

jpn
20th July 2006, 14:22
QStringList::size() (http://doc.trolltech.com/3.3/qvaluelist.html#size) returns an unsigned integer value and you are comparing it to a signed integer.
The following won't produce the warning:


for (uint i = 0; i < values.size(); ++i) {
...
}