ゲームが作れるようになるまでがんばる日記

ゲーム制作のことを中心にゲームに関することを書いています

2009-06-04から1日間の記事一覧

constその2 const_iterator

Effectvie C++ 第1章3項STLのiteratorでのconstの場合。iteratorの宣言にconstを付けるとiterator自体がconstとなり、参照先のデータはconstとはならず変更できる。 std::vector<int> v; const std::vector<int>::iterator p = v.begin(); *p = 123; // これはOK p++; </int></int>…