Your limit is an int, which is too small to hold the number you have put in it. (Your compiler should have complained about this.) Try using a long long or somesuch.
Start runningcount at 2, not one.
Your primeChecker() function is fine, but it will be slow.
Hope this helps.
Duoas
Postaholic
2,043 posts since Oct 2007
Reputation Points: 1,140
Solved Threads: 229