>>580
スレッドがクラッシュするぞ。

#include <iostream>
#include <exception>
using namespace std;

int main()
{
double d = 0.0;

try {
while (true) {
d += 1e308;
cout << d << ' ';
}
}
catch (const exception &err) {
cout << "overflow occured." << endl;
}
}