Bonjour à tous,
Mon probléme est le suivant, j'ai besoin d'une bibliothéque mais quand je lance le make j'ai ce message d'erreur:
In function 'bool libcmatrix::ismember(const T&, const typename T::value_type&) [with T= libcmatrix::List<unsignedint>]'
no matching function for call to 'find(const unsigned int*, const unsigned int* const&, const unsigned int&)'
Voici la ligne de code pour la déclaration de ismember():
template<typename T> inline bool ismember(const T& a, const typename T::value_type& v)
{
const typename T::const_iterator end=a.end();
return (std::find(a.begin(),end,v)!=end);
}
Voici la ligne de code pour l'utilisation de ismember:
void MoleculeStructure::addConnections(const BaseList<size_t>& newcon)
{
for (size_t i=newcon.size();i--;) { //looking for what molecule to add
const size_t curatom=newcon(i);
for (size_t m=connections.size();m--;) {
List<size_t>& curmol=connections(m);
if (ismember(curmol,curatom)) {
for (size_t j=newcon.size();j--;) { //add all new connections
if (!ismember(curmol,newcon(j)))
curmol.push_back(newcon(j));
}
return;
}
}
}
//molecule is not found i.e. all connections are new
connections.push_back(newcon);
}
Je pense qu'il y a un probléme de typage de variable pour la fonction find() mais je n'en suis pas sûr et je ne trouve pas le moyen d'y remédier.
Pourriez-vous m'aider svp?
Merci d'avance
Partager