From b85830e8a852392036a803b7f6bb417c28ff17c4 Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Thu, 28 Feb 2019 19:47:40 -0500 Subject: Speaker debug output shows count --- dialogue.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'dialogue.cpp') diff --git a/dialogue.cpp b/dialogue.cpp index 0e0c7bc..47a761d 100644 --- a/dialogue.cpp +++ b/dialogue.cpp @@ -20,6 +20,7 @@ struct speaker_data { std::string name; histogram nextSpeaker; rawr chain; + size_t count = 0; }; @@ -49,6 +50,7 @@ int main(int, char**) speaker_id spId = speakers.add(speaker); speaker_data& myData = speakerData[spId]; myData.name = speaker; + myData.count++; allSpeakers.add(spId); @@ -73,7 +75,7 @@ int main(int, char**) std::cout << "Speakers:" << std::endl; for (auto& sp : speakerData) { - std::cout << " " << sp.second.name << std::endl; + std::cout << " " << sp.second.name << ": " << sp.second.count << std::endl; } std::cout << std::endl; -- cgit 1.4.1