Mail Archives: djgpp/1994/06/01/13:29:12
Hello all,
I'm writing a program that uses the function double arg(Complex) that is in
the Complex C++ include file. I found that I needed to modify the results of
arg() so I began to code a function to do that... starting by just returning
arg(z). The code crashes. I've stripped down the code... Do you all see
any reason for the code to crash, does it crash on your system?
(I'm using v1.11maint5) The code compiles and runs fine with TC.
<------------- Begin Cut --------------------->
//
// This program crashes... running symify on it yields _main+122
//
// Compile with gcc test.cc -o test -lgpp -lm
#include <iostream.h>
#include <math.h>
#include <Complex.h>
double a(Complex z);
int main(void)
{
Complex z;
z=Complex(1,2);
cout << arg(z) << "\n";
cout << "-------\n";
cout << a(z) << "\n";
return 1;
}
double a(Complex z) {
return arg(z);
}
<------------- End Cut ----------------------->
Thanks for any help you can provide! :)
Jon Nash
Physics Department
Colorado State University
Tesla AT Lamar DOT ColoState DOT EDU
- Raw text -