[OOP] print most frequence words in a paragraph

i have some classes:

1
2
3
4
5
6
7
8
9
10
11
class Word
{
private:
	string m_arrLetters;
public:
	Word();
	Word(string Letters);
	Word(const Word& w);
	friend istream& operator>>(istream& is, Word &w);
	friend ostream& operator<<(ostream& os, Word &w);
};


1
2
3
4
5
6
7
8
9
10
11
12
class Sentence
{
private:
	vector<Word> m_arrWords;
	char m_End;
public:
	Sentence();
	Sentence(vector<Word> Words);
	Sentence(const Sentence& s);
	friend istream& operator>>(istream& is, Sentence &s);
	friend ostream& operator<<(ostream& os, Sentence &s);
};


1
2
3
4
5
6
7
8
9
10
11
class Paragraph
{
private:
	vector<Sentence> m_arrSentences;
public:
	Paragraph();
	Paragraph(vector<Sentence> Sentences);
	Paragraph(const Paragraph& p);
	friend istream& operator>>(istream& is, Paragraph &p);
	friend ostream& operator<<(ostream& os, Paragraph &p);
};


Now, i have to print the most frequence words in a paragraph, could you tell me the way to do this?
Topic archived. No new replies allowed.