我的问题是,我想使用由从文本文件中在 carac 中接收的关键字启动的函数,并在该函数中使用 carac 之后的字符串,该函数位于包含的其他文件中,但我不知道该怎么做。
for(std::string carac; fichier>>carac;)
{
auto found = _map.find(carac);
if(found != _map.end()
{
found->second();
pile_double.afficher(); // Pile is the french word for a LIFO Queue, afficher is the one for display
}
}
如果我理解正确的话,你需要做的就是再次提取:
if (found != _map.end())
{
std::string name;
fichier >> name; // this is the second word
found->second();
pile_double.afficher();
}
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)