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>>
]
回避する方法はないでしょうか?