Codeblocks error when build

Hi guys , I looked on the manual and on google as well without finding a straight answer to what I am about to ask here. This code in DevC++ works and compiles fine but in Codeblocks is printing :

Process terminated with status -1073741510 (0 minute(s), 14 second(s))
Could you please bring some light into this?
Any thoughts would be much appreciated.Thanks!



1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
  
#include<iostream>
#include<math.h>

using namespace std;

int main(void){
	
	int n;
	int  is_prime;
	int  i;

	is_prime=true;
	
	cout<<"Insert No"<<endl;
	cin>>n;
	
	i=2;
	
	while(n >= i*i){
		
		if(n%i == 0)
		is_prime=false;
		i++;
		
	}
	
	if(is_prime)
	cout<<"We have Optimus"<<endl;
	else
	cout<<"We have Bumblebee"<<endl;
	return 0;
}
The code seems to be fine (although you should learn to indent)

Check out the project configuration.
"Process terminated with status -1073741510" is not to helpful as an error message.
Ok Thank you, I will keep digging.
Topic archived. No new replies allowed.