0

私はこれを見てきました: 2d ベクトルの反復子

そして、2D イテレータの内容を表示できるかどうかを尋ねたかった:

template<typename Inverse>
MFCC(Inverse begin, Inverse end, Struct::returnType type)
{   
  for(auto row = begin; (row != end); row++)
  {
      for(auto col = row->begin(); col != row->end(); col++) {


      }
  }
}

私は(研究的に)次のことを試しました:

std::cout << *row*col << endl;

しかし、喜びもなく、私はそれが私を直撃していると確信していますが、私はただ尋ねたかっただけです.

4

1 に答える 1

1

これを試しましたか?

template<typename Inverse>
void MFCC(Inverse begin, Inverse end)
{   
  for(auto row = begin; (row != end); row++)
  {
      for(auto col = row->begin(); col != row->end(); col++) {
        std::cout<<*col<<" ";
      }
      std::cout<<std::endl;
  }
}


//MFCC(vec.begin(),vec.end());

が何であるかわかりませんがStruct::returnType、おそらく回避できます。

于 2013-08-12T17:56:09.580 に答える