ホーム » 2012 » 10月 » 18

日別アーカイブ: 2012/10/18

2012年10月
 123456
78910111213
14151617181920
21222324252627
28293031  

カテゴリー

アーカイブ

ブログ統計情報

  • 77,368 アクセス



operator[]

以下の様なコードで,配列の要素として書き戻す部分がうまく機能してなかった.
BOOL d3D_PgonsA::SetUniqueName (void) {
  { // 空の場合 “Pgons_0x” を設定
    for (int index=0 ; index<this->GetCount() ; index++) {
      d3D_Pgons1 pgons = (*this)[index] ;
      CString name = pgons.GetName().c_str() ;
      if (name.IsEmpty()) {
        name.Format(_T(“Pgons1_%03d”),index+1) ;
        pgons.SetName(name) ;
        (*this)[index] = pgons ;
        continue ;
        }
      }
    }
  // …
  }
原因は, d3D_Pgons1& operator[] (const int index) が定義されてなかったためだが,未だによくわかってない.

Is this 投稿 useful? Useful Useless 0 of 0 people say this 投稿 is useful.