#include "sampler.h" #include #include #include #include using std::cout; using std::cin; using std::istream; using std::ifstream; using std::stringstream; using std::string; void sampleInput(istream& is, bool update) { Sampler sampler; while (true) { //c++ handles strings with streams better string s; getline(is, s); if (!s.empty()) { //possibly empty because of end of file stringstream sstream(s, stringstream::in | stringstream::out); while (true) { sstream>>s; sampler.get(s); if (sstream.eof()) break; } if (update) cout<