error C2679: binary '=' : no operator found which takes a right-hand operand of type 'ldiv_t' (or there is no acceptable conversion)
C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(82): could be '_div_t &_div_t::operator =(const _div_t &)'
while trying to match the argument list '(div_t, ldiv_t)-------代码如下:
long x,x2,y,dlineup;
div_t div_r;。。
div_r = div(y + dlineup,8.0);//yk
C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(82): could be '_div_t &_div_t::operator =(const _div_t &)'
while trying to match the argument list '(div_t, ldiv_t)-------代码如下:
long x,x2,y,dlineup;
div_t div_r;。。
div_r = div(y + dlineup,8.0);//yk
解决过这个问题,加一个强制转换