Here is an example of a login authentication program in C++ using a dictionary object to store usernames and passwords.
Example: C++ Authentication Program
The following C++ program using the map function to create a dictionary object and using the map's find method to check whether the key exists or not.
#include <iostream>
#include <map>
Output:
Enter username:
david
Enter password:
123
Login Successfully!