C++ has a complex class but it is not the same as Origin C's complex. In VC you will have to do this:
#include <complex>
typedef struct {
double real;
double imag;
} complex_t;
extern "C" complex_t Xnm(double x1, double y1)
{
std::complex<double> eye(0.0, 1.0);
std::complex<double> xnm = x1 + eye*y1;
complex_t ret;
ret.real = xnm.real();
ret.imag = xnm.imag();
return ret;
}