C++相談室 part9
■ このスレッドは過去ログ倉庫に格納されています
0581デフォルトの名無しさん
NGNGスレッドがクラッシュするぞ。
#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;
}
}
■ このスレッドは過去ログ倉庫に格納されています