【C++】STL(Standard Template Library)相談室 11at TECH
【C++】STL(Standard Template Library)相談室 11 - 暇つぶし2ch93:デフォルトの名無しさん
09/02/04 18:31:55
すみません、vectorで質問なのですが
//------------------------------------
#include <vector>
using namespace std;

int _tmain(int argc, char* argv[])
{
vector<bool> bool_vect(10);
bool& b = bool_vect[5];

vector<int> int_vect(10);
int& i = int_vect[5];

return 0;
}
//-------------------------------------

bool のほうで以下のコンパイルエラーが出てしまいます
error C2440: '初期化中' : 'std::_Vb_reference<_MycontTy>' から 'bool &' に変換できません。
with
[
_MycontTy=std::vector<bool,std::allocator<bool>>
]

回避する方法はないでしょうか?


次ページ
続きを表示
1を表示
最新レス表示
レスジャンプ
類似スレ一覧
スレッドの検索
話題のニュース
おまかせリスト
オプション
しおりを挟む
スレッドに書込
スレッドの一覧
暇つぶし2ch