/****************************************************************************** * This program creates a password from a phrase. * * Copyright © 2020 Richard Lesh. All rights reserved. *****************************************************************************/ #undef NDEBUG #include "Utils.hpp" #include #include #include #include using namespace std; static string const PHRASE = "Four score and seven years ago"; int main(int argc, char **argv) { string password = ""; vector words = Utils::split(regex(" "), PHRASE); for (auto word : words) { if (!word.empty()) { password += word.substr(0, 1); } } cout << "Password is " << password << endl; return 0; }