diff options
Diffstat (limited to 'dialogue.cpp')
-rw-r--r-- | dialogue.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
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 { | |||
20 | std::string name; | 20 | std::string name; |
21 | histogram<speaker_id> nextSpeaker; | 21 | histogram<speaker_id> nextSpeaker; |
22 | rawr chain; | 22 | rawr chain; |
23 | size_t count = 0; | ||
23 | 24 | ||
24 | }; | 25 | }; |
25 | 26 | ||
@@ -49,6 +50,7 @@ int main(int, char**) | |||
49 | speaker_id spId = speakers.add(speaker); | 50 | speaker_id spId = speakers.add(speaker); |
50 | speaker_data& myData = speakerData[spId]; | 51 | speaker_data& myData = speakerData[spId]; |
51 | myData.name = speaker; | 52 | myData.name = speaker; |
53 | myData.count++; | ||
52 | 54 | ||
53 | allSpeakers.add(spId); | 55 | allSpeakers.add(spId); |
54 | 56 | ||
@@ -73,7 +75,7 @@ int main(int, char**) | |||
73 | std::cout << "Speakers:" << std::endl; | 75 | std::cout << "Speakers:" << std::endl; |
74 | for (auto& sp : speakerData) | 76 | for (auto& sp : speakerData) |
75 | { | 77 | { |
76 | std::cout << " " << sp.second.name << std::endl; | 78 | std::cout << " " << sp.second.name << ": " << sp.second.count << std::endl; |
77 | } | 79 | } |
78 | std::cout << std::endl; | 80 | std::cout << std::endl; |
79 | 81 | ||