diff options
| -rw-r--r-- | manifesto.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
| diff --git a/manifesto.cpp b/manifesto.cpp index 3c440c3..6fc35f8 100644 --- a/manifesto.cpp +++ b/manifesto.cpp | |||
| @@ -35,11 +35,14 @@ int main(int argc, char** argv) | |||
| 35 | std::ifstream corpus(config["corpus"].as<std::string>()); | 35 | std::ifstream corpus(config["corpus"].as<std::string>()); |
| 36 | corpus.ignore(loc); | 36 | corpus.ignore(loc); |
| 37 | 37 | ||
| 38 | char buffer[140]; | 38 | if (!corpus.eof()) |
| 39 | while (corpus) | ||
| 40 | { | 39 | { |
| 41 | corpus.read(buffer, 140); | 40 | char buffer[140]; |
| 42 | tweets.push_back(std::string(buffer, 140)); | 41 | while (corpus) |
| 42 | { | ||
| 43 | corpus.read(buffer, 140); | ||
| 44 | tweets.push_back(std::string(buffer, 140)); | ||
| 45 | } | ||
| 43 | } | 46 | } |
| 44 | } | 47 | } |
| 45 | 48 | ||
| @@ -69,4 +72,6 @@ int main(int argc, char** argv) | |||
| 69 | 72 | ||
| 70 | std::this_thread::sleep_for(std::chrono::hours(6)); | 73 | std::this_thread::sleep_for(std::chrono::hours(6)); |
| 71 | } | 74 | } |
| 75 | |||
| 76 | std::cout << "Corpus complete!" << std::endl; | ||
| 72 | } | 77 | } |
