R
Richard Weeks
I have a library of functions for operations on complex numbers
and a complex type defined as a struct in a header also
containing the prototypes for the library. I want to make this an
opaque type, i.e. I don't want the real and imaginary fields to
be visible to the user of the interface. I tried doing this:
static struct cplex {
double real;
double imag;
};
but the compiler complained "storage class not legal in this
context." How can I implement cplex as an opaque type?
and a complex type defined as a struct in a header also
containing the prototypes for the library. I want to make this an
opaque type, i.e. I don't want the real and imaginary fields to
be visible to the user of the interface. I tried doing this:
static struct cplex {
double real;
double imag;
};
but the compiler complained "storage class not legal in this
context." How can I implement cplex as an opaque type?