Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // nastyafile.cpp: определяет точку входа для консольного приложения.
- //
- #include "stdafx.h"
- #include <fstream>
- #include <iostream>
- #include <string>
- #include <sstream>
- #include <map>
- int main()
- {
- std::ifstream fin("1.txt", std::ios::in);
- std::string str,tmp,t;
- char * fuck=new char[1024];
- std::istringstream iss;
- std::map<std::string, std::string> dictionary;
- if (!fin.is_open())
- return 0;
- while (!fin.eof())
- {
- getline(fin, str);
- iss.str(str);
- (iss >> tmp, tmp);
- t = iss.str();
- t.erase(t.begin(), t.begin() + tmp.size() + 1);
- dictionary.insert(std::pair<std::string, std::string>(tmp,t));
- //dictionary.insert(std::pair<std::string, std::string>((iss >> tmp, tmp), (t=iss.str(), t.erase(t.begin(), t.begin() + tmp.size()+1),t)));
- }
- _gettch();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement