Link to home
Start Free TrialLog in
Avatar of meow00
meow00

asked on

Comparing signed and unsigned values

Hi experts,

   How do I get rid of the following warning ?
 
  line 89 :  for(int i=0; i< group_1.size(); i++)

[C++ Warning] Meow.cpp(89): W8012 Comparing signed and unsigned values

 many thanks !
Avatar of andrewjb
andrewjb
Flag of United Kingdom of Great Britain and Northern Ireland image

for ( unsigned int i = 0 .....

?
Avatar of nonubik
nonubik

or for(int i=0; i< (int)group_1.size(); i++)
Or, really, know what the correct tyoe of group_1.size() is, and use that for your index...

What's group_1 ?
SOLUTION
Avatar of Axter
Axter
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I feel somewhat cheated!