For loops are typically used for things which we know are of a fixed limit.

While loops are used for things that could continue forever.

...To be honest, they are exactly the same, but it's how the programmer 'reads' it that is important in this case. Both can be made to do exactly the same thing. An example is that a for loop is used to cycle through an array, typically a while loop is not. Mostly because an array should have a fixed number... ....until you get to dynamic memory allocation in which case....

I think that this value 12345678901234567900 exceeds the maximum exceptable value for type int .
You should use an integer value that is not greater than INT_MAX (#include <climits>) or std::numeric_limits<int>::max (#include <limits>).