ramsrambo
April 9th, 2012, 01:21 AM
Hi,
I am using Ubuntu Maverick 64 bit.
Pl. look at the following c++ program
This program suppose to crash bcos a number is being divided by zero -
------------------------------------
#include <iostream>
using namespace std;
int divint(int, int);
int main() {it
int x = 5, y = 2;
cout << divint(x, y);
x =3; y = 0;
cout << divint(x, y);
return 0;
}
int divint(int a, int b)
{
return a / b;
}
---------------------
When I compile with g++ and execute it just throws floating point exception, does not core dump. Why?
I need the core dump. Should I look elsewhere to get the core dump?
I am using Ubuntu Maverick 64 bit.
Pl. look at the following c++ program
This program suppose to crash bcos a number is being divided by zero -
------------------------------------
#include <iostream>
using namespace std;
int divint(int, int);
int main() {it
int x = 5, y = 2;
cout << divint(x, y);
x =3; y = 0;
cout << divint(x, y);
return 0;
}
int divint(int a, int b)
{
return a / b;
}
---------------------
When I compile with g++ and execute it just throws floating point exception, does not core dump. Why?
I need the core dump. Should I look elsewhere to get the core dump?