2 ms·
double foo; compute(foo); That's not even a crash, just silent garbage. I don't know how you expect to do better with an uninitialised variable (except in
by Y_Y 9y ago
double foo;
compute(foo);
That's not even a crash, just silent garbage.
I don't know how you expect to do better with an uninitialised variable (except ints that default to 0).
foo dereferences to an int, but what could you hope to happen if you never gave it some memory to point to?