0

この演算子の適切な戻り値を取得するのに苦労しています (これは私のコードではなく、修正しようとしているだけであり、C++ で修正するほど上手ではありません) 誰でもこれを手伝ってくれますか? それはデータ型クラスですデジタル回路の高レベル設計用に定義されています。

tempエラーなしでこれを返す方法、これに対する特別なアプローチはありますか?

inline friend std::ostream& operator << ( std::ostream& os, const sc_float &v)
{
   if (c_DEBUG) std::cout << "debug: operator << called " << endl; //debug
   // fixme - this is only copy of sc_float2double function
   double temp;
   temp = (double)v.man / exp2(m_width);
   temp += 1.0;
   temp *= exp2((double)v.exp - exp2((double)e_width - 1.0) + 1.0);
   temp *= (v.sign == true ? -1.0 : 1.0);
   //os << "(" << v.sign << " , " << v.exp << " , " << v.man << ")"; // debug
   os << temp;
 }

そこに追加すると、return os;

そこにあるsystemCライブラリとインスタンスを指す226エラーが発生しました。systemCクラスに関してストリーム演算子の宣言を行った人はいますか、またはそれがどのように行われたか知っていますか?

4

1 に答える 1