Displaying map stl
- by BSchlinker
Declared a map early on:
map<char*,char*> rtable; // used to store routing information
Now I'm attempting to display the contents of the map:
void Routes::viewroutes(){
typedef map<char*, char*>::const_iterator iter;
for (iter=rtable.begin(); iter != rtable.end(); ++iter) {
cout << iter->second << " " << iter->first << endl;
}
}
Receiving the error "expected primary-expression before '!=' token and for '-' token. Can't seem to understand the error I'm making here. Any ideas?