J'essaie de comprendre ce que ce morceau de code fait:avertissement constructeur std :: vecteur
std::vector<std::vector<bool> > visited(rows, std::vector<bool>(cols, 0));
« lignes » et « » sont les deux Col. entiers.
Il appelle le constructeur, mais je ne sais pas comment. Il est le code exemple je suis arrivé de certains projets ...
Il est également de me donner l'avertissement suivant:
c:\program files (x86)\microsoft visual studio 10.0\vc\include\vector(2140): warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning)
1> c:\program files (x86)\microsoft visual studio 10.0\vc\include\vector(2126) : see reference to function template instantiation 'void std::vector<_Ty,_Ax>::_BConstruct<_Iter>(_Iter,_Iter,std::_Int_iterator_tag)' being compiled
1> with
1> [
1> _Ty=bool,
1> _Ax=std::allocator<bool>,
1> _Iter=int
1> ]
1> c:\ai challenge\code\project\project\state.cpp(85) : see reference to function template instantiation 'std::vector<_Ty,_Ax>::vector<int>(_Iter,_Iter)' being compiled
1> with
1> [
1> _Ty=bool,
1> _Ax=std::allocator<bool>,
1> _Iter=int
1> ]
Quelqu'un pourrait-il aider?
Merci, cela m'a aidé :) – xcrypt