SIGFPE Runtime Error.


#1

Can someone please tell me when does one get SIGFPE runtime error. I’m pretty sure i’m not dividing by zero at any point in my code.


#2

On gcc -W and -Wall turn on different sets of warnings, so both of them are necessary.

For more Visit: Innovative Apps Here…


#3

Hi. Could you please give a link to your code so we can see the code. It is difficult to say anything without that.


#4

#include

using namespace std;

int main()
{
int count,i,a;
unsigned int inputNumber;
int cnt[10];

cin>>count;

for(i = 0;i<count;i++)
{
	cin>>inputNumber;
	cnt* = 0;
	a = 5;
	while(a < inputNumber)
	{
		cnt* = cnt* + inputNumber/a;
		a = a * 5; 
	}
}

for (int j = 0; j < i; j++)
{
	cout<<"

"<<cnt[j];
}

return 0;

}

I am getting run time error … where is my mistake … i m not getting ???


#5

can you please elaborate. i’m a newbie. also can you tell me about the different set of warnings.