Date: Tue, 15 Mar 1994 13:35:18 -0700 From: tesla AT lamar DOT ColoState DOT EDU (Jon Nash) To: djgpp AT sun DOT soe DOT clarkson DOT edu Subject: Compiler Aborts! Why? (Solved) Well, the mystery gives way... The problem can be summed up in a few lines of code... (my fault for being sloppy in the first place:) ) #include #include Complex *u; int main(void) { float z=5.0; u = new Complex[z]; cout<<"Watch me Abort!\n"; return 1; } This code will make the compiler Abort! with no warning messages. I found this error when (I forgot exactly who suggested this - Thanks to who ever it was!) I tried to compile my code on the RS/6000 xlC compiler. The error that compiler gave was "float" cannot be converted to "int" "float*" cannot be converted to "complex*" So if I just say u = new Complex[int(z)]; everything works great! It was a dumb mistake, but I sure wish the compiler would give a better warning then "Abort!" Thanks to all who helped me! DJ - I hope you see this note before you spend too much time playing with my code! Sincerely, Jon Nash Tesla AT Lamar DOT ColoState DOT EDU Colorado State University Physics Department