- Apr 6, 2002
- 7,141
- 1
- 0
cout << 1/0.0 << endl;
A friend just IMed me saying this printed out 'inf' on his computer. He says he's using gcc. My position is that his compiler has a line of code in it that traps for division like this instead of giving him the seg fault he so richly deserves.
A friend just IMed me saying this printed out 'inf' on his computer. He says he's using gcc. My position is that his compiler has a line of code in it that traps for division like this instead of giving him the seg fault he so richly deserves.