Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
このようなものでペアのベクトルを初期化したかった
std::vector< std::pair<bool, bool> > myvector(initSequence.size(), X );
すべてのペアを(false、false)で初期化する場合、Xの代わりに何を使用すればよいですか?
ありがとうございました
std::pair<bool,bool>(false, false)
また
std::make_pair(false, false)
何もない。 std::pair<bool, bool>デフォルトでは。として構築されmake_pair(false, false)ます。
std::pair<bool, bool>
make_pair(false, false)