3 ms·
>> Errors should never pass silently. > Well guess what, with C++ they don't even pass compilation. int * a; *a = 5; Segmentation fault. Oopsy. To be fair,
by disconnected 9y ago
>> Errors should never pass silently.
> Well guess what, with C++ they don't even pass compilation.
int * a;
*a = 5;
Segmentation fault. Oopsy.
To be fair, "g++ -Wall" does complain that "a" is not initialized. But it is a warning, not an error.
(And don't tell me that "you are not supposed to use pointers". They exist, someone is going to use them and proceed to shoot themselves in the foot.).