12345678910111213141516171819202122232425262728293031323334353637383940414243444546
#include <iostream> #include <fstream> #include <string> #include <cstdlib> #include <cstdio> #include <vector> using namespace std; struct Account { string username; string password; }; void load_account_data(std::vector<Account> & accounts) { // your code here } bool valid_credentials(const string& username, const string& password, vector<Account> & accounts) { // your code here } int main() { vector<Account> accounts; load_account_data(accounts); string username, password; cout << "Username: "; getline(cin, username); cout << "\nPassword: "; getline(cin, password); if (valid_credentials(username, password)) { cout << "Welcome " << username; } else { cout << "Password and Username don't match"; } }