Witam
Mam problem z mapa nastepujacej postaci
#include"node.h"
#include<set>
#include<map>
using namespace std;
bool compareMethod (const node &,const node &);
class nodeContainer{
private:
map<char,charNode> mapNode;
set<node> setNode;
public:
void addCharNode(char);
void deleteCharNode(char);
void parseString();
void buildTree();
charNode& getTreeTop();
};
#include "nodeContainer.h"
#include <iostream>
#include <string>
using namespace std;
bool compareMethod (const charNode& first,const charNode& second){
bool retval;
if((first.getVal())>=(second.getVal()))
{
retval=true;
}
else
{
retval = false;
}
return retval;
}
void nodeContainer::parseString(){
string dane;
char tst;
cout<<"Podaj ciag znakow: ";
getline(cin,dane);
string::iterator itString;
cout<<dane<<endl;
cout<<"Znak nr 3 : "<<tst/*it[2]*/<<endl;
for(itString=dane.begin();itString<dane.end();itString++){
char tmp = *itString;
charNode ola(tmp);
if(mapNode.size()==0) mapNode[tmp]=ola;
}
}
int main(void){
nodeContainer p;
p.parseString();
return 0;
}
w tej linijce otrzymuje nastepujacy blad
if(mapNode.size()==0) mapNode[tmp]=ola;
/usr/include/c++/4.3/bits/stl_map.h error: no matching function for call to ‘std::charNode()’
node.h note: candidates are: std::charNode(const std::charNode&)
node.h note: std::charNode(char)
make: *** [nodeContainer] Błąd 1
Co to jest ta matchin function i co ona ma robic??
Pozdrawiam