There are several flaws in my code.
First, what is an object Tweet? In the statement, a "tweet" is defined as a single message.
In my code, your class does not seem Tweet this definition. It seems to be much more than that. It seems to contain users (trouverUsager ()). The part of the user management should be elsewhere.
Second, the operator >> (std :: istream &, Tweet *) should read one tweet. The while loop should be elsewhere (hand). In addition, it is more appropriate to reference a pointer to the >> operator.
Third, the use of large array "char line [100000]" can be problematic. A char [] is not as abstract a std :: string object. In addition, the size is arbitrary. Most tweets take in less than 140 characters. Here, we provided nearly 100 kilobytes on the execution stack. That's a lot for 140. In addition, if we ever needed to change the length of tweet more than 100,000 characters, should think about updating the code. Using a std :: string, as in my example, is clearly more appropriate.
Try to restructure my program to get closer to that suggestion.
Finally, to help you, here is a little about how you can easily count the number of tweets posted in users:
To count the words by users, the trick is to make a map of map.
map >.
This is not the only way. Your solution, which seems a map is just as well, or even better.