c++ - crash: uninitialized reference
- Luna Kid (12/12) Nov 04 2003 Due to a missing error message, this compiles and crashes:
Due to a missing error message, this compiles and crashes: struct X { // X() {} // uncomment to get the error msg. int& x; }; int main() { X bad; bad.x = 0; } Cheers, Sz.
Nov 04 2003