Bonjour

j'ai rencontré un problème basique quand j'ai volu parcourir une map voilà mon code :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
std::vector<nsaddr_t>   OLSR_state::find_nodes_bych(nsaddr_t ch_add)
{
 
 
 
    for( nbch_t::const_iterator it=nbch().begin() ; it!=nbch().end;it++)
    {
 
    }
 
 
//avec typedef std::map<nsaddr_t,nsaddr_t>             nbch_t
 
}

j'ai eu l'erreur suivante :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
error: no match foroperator!=’ in ‘it != OLSR_state::nbch()->std::map<_Key, _Tp, _Compare, _Alloc>::end [with _Key = int, _Tp = int, _Compare = std::less<int>, _Alloc = std::allocator<std::pair<const int, int> >]’
/usr/include/c++/4.4/bits/stl_tree.h:291: note: candidates are: bool std::_Rb_tree_const_iterator<_Tp>::operator!=(const std::_Rb_tree_const_iterator<_Tp>&) const [with _Tp = std::pair<const int, int>]
j'ai aucune idée de quoi il s'agit, j'ai entendu dire dans les forum que c est èa cause de la version gcc (je suis sous netbeans ubuntu) mais rien de plus :s

merci pour votre aide