Comment puis-je initialiser une chaîne de caractères dans une carte?Stringstream Post-Initialize à l'intérieur de la carte?
Est-ce encore possible ou dois-je créer une chaîne strings *?
std::map<std::string, std::stringstream> mapTopics;
if(mapTopics.end() == mapTopics.find(Topic))
{
mapTopics[Topic] = std::stringstream(""); // Post Initialize <---
}
std::map<std::string, std::stringstream>::iterator mapTopicsIter = mapTopics.find(Topic);
mapTopicsIter->second << " <say speaker=\"" << sSpeaker << "\">" << label << "</say>" << std::endl;
Que voulez-vous dire après l'initialisation? Que représente cet extrait de code? Je ne comprends pas vraiment ce que vous demandez. – SoapBox
a ajouté un commentaire pour montrer ce que je veux dire. – Hendrik