Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void generateTest() {
- string elem;
- ofstream out;
- const int dim = 1000000;
- const int lenghtWord = 4;
- string fileName = "input.txt";
- out.open(fileName);
- string alphabet = "qwertyuiopasdfghjklzxcvbnm";
- srand(time(0));
- for (int i = 0; i < dim; i++) {
- elem = "";
- for (int j = 0; j < lenghtWord; j++)
- elem += alphabet[rand() % 26];
- out << elem << endl;
- }
- out.close();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement