if x and y is long(that's 32 bits integer in VC).
Just
__int64 a=(__int64)x*(__int64)y;

解决方案 »

  1.   

    有符号的
    LONGLONG Int32x32To64(
      LONG Multiplier,    // the first signed 32-bit integer
      LONG Multiplicand   // the second signed 32-bit integer
    );
    无符号的
    ULONGLONG UInt32x32To64(
      DWORD Multiplier,    // the first unsigned 32-bit integer 
      DWORD Multiplicand   // the second unsigned 32-bit integer 
    );
     
    虽然形式上是两个函数,实际上内部作过优化,效率很高。
      

  2.   

    到我的主页上看看吧,上面有任意长度整数乘法
    http://duz.at.china.com/math/index.html

    htpp://duz.home.chinaren.com/math/index.html