//头文件的包含
#include "stdafx.h"
#include<iostream>
#include<fstream>
#include<sstream>
#include<vector>
#include<memory>
#include<map>
#include<set>
using namespace std;
using line_no = std::vector<std::string>::size_type;
class QueryResult;
class TextQuery {
public :
TextQuery(ifstream&);
QueryResult query(const string&)const;
private:
shared_ptr<vector<string>> file; //存储文件内容
map<string, shared_ptr<set<line_no>>> wm;//单词和出现的行数构成的set组成map
};
class QueryResult {
friend ostream& print(ostream&,cons