Native exiting with with code: -1073741510 (0xc000013a) while using prime checker function -


i have been trying create own prime checker function, although strangely when call isprime(7) returns 1, good, when call isprime(9) gives me following error:


'mathematics.exe': loaded 'c:\documents , settings\mbryant\my documents\visual studio 2010\projects\mathematics\debug\mathematics.exe', symbols loaded. 'mathematics.exe': loaded 'c:\windows\system32\ntdll.dll', cannot find or open pdb file 'mathematics.exe': loaded 'c:\windows\system32\kernel32.dll', cannot find or open pdb file 'mathematics.exe': loaded 'c:\windows\system32\msvcp100d.dll', symbols loaded. 'mathematics.exe': loaded 'c:\windows\system32\msvcr100d.dll', symbols loaded. thread 'win32 thread' (0x6ec) has exited code -1073741510 (0xc000013a).

the program '[6072] mathematics.exe: native' has exited code -1073741510 (0xc000013a).

here code:

#include <iostream> using namespace std; bool isprime(int x){     int b = 0;     int = 2;     if(x == 2){     return 1;     }     if (x > 2){         while(i < x){             if ( (x % i) != 0){             b = b + 1;             = + 1;             }          }         if (b > 0){         return 1;         } if (b == 0){         return 0;         }         }  } int main(){     cout << isprime(9) << endl;     system("pause");     return 0; } 

helping resolving issue appreciated.


Comments

Popular posts from this blog

PHP and MySQL WP -

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

go - golang pprof for c library code -