· 4 years ago · May 27, 2021, 05:26 PM
1#include <iostream>
2#include <fstream>
3#include <string>
4
5int main()
6{
7 std::ifstream typosIn("typos.in");
8 std::ofstream typosOut("typos.out");
9
10 const std::string correct = "the_correct_email_dns"; // i.e.: yahoo.com, gmail.com, yahoo.ro, hotmail.com, aol.com, etc
11 std::string typo;
12
13 while (typosIn >> typo)
14 typosOut << "('" << typo << "','" << correct << "'),\n";
15
16 typosIn.close();
17 typosOut.close();
18 return 0;
19}