danvath wrote:It depends on your computer, each computer has different representations for int, float, double, etc... There is a test to see, I think it goes something like:
In a dos box:
run like a hellow world app, but then include
printf (cout, printline, whatever your languages command for printing to screen is) << float
printf << double
printf << int
This should make it print to screen what your computer can set the maximum value to. I think the maximum for int is in the thousands, but that i<200 can still cause many problems. In a situation like this were you don't know exactly how long you need it to run its best to do a do while or while loop. This way you do not need to specify i<200 and you can continue on. So like while(logs<400) go on from there. This way instead of it being 200 run throughs of the code, which can still cause I to go up without collecting a log, now you have it running until it collects 400 logs.
This is not C or C++. This is Groovy, which is based on Java.