Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <fstream>
- #include <set> /* !ОБЯЗАТЕЛЬНО ДОБАВИТЬ!!!!!!!!!!!!!!!*/
- set<string> getPossibleVocabulary() {
- setlocale(LC_ALL, "Rus");
- system("chcp 1251");
- set<string> vocabulary = {};
- string path = "C:\\Users\\Рустамчик\\Desktop\\опишка\\input.txt";
- string word = "";
- ifstream fin(path);
- if (!fin.is_open()) {
- printf("Какая-то ошибка с файлом.");
- }
- else {
- while (fin >> word) {
- vocabulary.insert({ word });
- }
- }
- fin.close();
- return vocabulary;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement