I try to make a set to store certain words of a text file. Then I want to remove these words from a map, which I already made up. I have successfully made a set to store these words, but I cannot remove them from the map. Besides, I cannot use a loop statement(like for loop or while loop).
#include <iostream>
#include <iomanip>
#include <fstream>
#include <iterator>
#include <algorithm>
#include <vector>
#include <string>
#include <map>
#include <set>
#include <utility>
#include <sstream>
#include <list>
ifstream stop_file( "remove_words.txt" );
ofstream out( "output.txt" );
set <string> S;
copy(istream_iterator<string>(stop_file),
istream_iterator<string>(),
inserter(S, begin(S)));
//copy: copy from text file into a set
remove_if(M.begin(), M.end(), S);
//remove: function I try to remove words among words stored in a map
//map I made up is all set, no need to worry