ajai@sce.carleton.ca (Ajai Sehgal) (11/15/90)
I have the following variable declared in a function:
static int mstore;
The function prototype is as follows:
void rfft(float *x, COMPLEX *y, int m)
note:COMPLEX is a structure with real and imag floats
Here's the problem:
After the first call to the function the statement mstore = m; is
executed. On the second call to the function I want to skip a section of
code if m still equals mstore, so I have the following:
if (m != mstore){
.....bunch of statements to initialize coefficients
}
Unfortunatly the "bunch of statements" are always executed ( I stepped through).
Putting a watch on m,mstore and m!=mstore I see the following:
m : 7
mstore: 7
m != mstore: 0
but if I insert the statement n = (m != mstore); and put a watch on n I get:
n : 1
What's going on here? If I compile using C instead of C++ everything works fine.Could this have something to do with using smart virtual tables under C++ ?
Any insight would be appreciated.
Regards, Ajai.
but if I insert the statement