When executing this function, an error occurs:
no matching function for call to 'std::map<std::basic_string<char>, char>::insert(std::pair<std::basic_string<char>, std::basic_string<char> >)'
The code itself:
void inital() { char buff[100]; ifstream fin("cmd.txt"); int strnum = 0; char end[] = "#STOP"; map <string, char> cmd; while(strcmp(buff, end) != 0) { std::cmatch result; std::regex my_regex("^PRG (.+) CMD ([az][0-9]+)$"); if (std::regex_match(buff, result, my_regex ) ) { cmd.insert(make_pair(result[2].str(),result[1].str())); } fin.getline(buff, 100); strnum++; } fin.close(); }