I'm trying to make a program that can handle numbers up to 9999999999, but 1410065389 seems to be my limit.
I'm trying to make a program that can handle numbers up to 9999999999, but 1410065389 seems to be my limit.
Try using long long...it will more than suffice...
I can't imagine any representation where 1410065389 is the limit of an integer. If you're using a signed 32-bit integer, the maximum is probably 2147483647.
Sounds like you have a stranger bug. Are you allocating that much memory? Perhaps that's all that your system has free. Or maybe you have a buffer overrun somewhere, or another type of memory error. Could you post your code?
dwk
Seek and ye shall find. quaere et invenies.
"Simplicity does not precede complexity, but follows it." -- Alan Perlis
"Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
"The only real mistake is the one from which we learn nothing." -- John Powell
Other boards: DaniWeb, TPS
Unofficial Wiki FAQ: cpwiki.sf.net
My website: http://dwks.theprogrammingsite.com/
Projects: codeform, xuni, atlantis, nort, etc.