Count the number of occurences in a word in a many text file using c++ vector of vector

Write your question here.
I have a collection of documents with each document represented by a vector of string ( vector<string> ) and the whole collection represented by a vector of string vector ( vector< vector<string> >.

for example:
using two text files are :
input text file 1: hi hello increment the salary hi as
input text file 2: hello hi magic is salary is

output:
text file 1:
hi - 2
hello -1
increment - 1
the - 1
salary - 1
as - 1

text file 2:
hello - 1
hi - 1
magic - 1
is - 2
salary - 1

Please Help me .. give me a code or any idea..

 
  
Topic archived. No new replies allowed.