Hello!

After I compile and run my program a windows error message shows up, it doesn't give some specific information it's just a standard windows xp error that asks me to send report.

It gives me the error because in my code I have some basic math like this:

int e = a - b;
int r = c - d;
int w = e / r;

Even if I make a simple console program with only those lines , it still gives me the error.

I'm using the latest version of DEV C++ on windows XP.

Recommended Answers

Please post a complete program along with starting values for the variables. I'd make an educated guess that you're dividing by zero, but that's pure speculation given your lack of detail.

Jump to Post

All 2 Replies

Please post a complete program along with starting values for the variables. I'd make an educated guess that you're dividing by zero, but that's pure speculation given your lack of detail.

Yes, that was the problem. Thank you!

In my console program I wrote the variables like this:

int a,b,c,d;

I overlooked division by 0.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.