Providing Username and Password to your application in C++
Ever wanted to provide a Username and Password to the application that you've created so that not everyone could run the program? If YES ! Then your wait is over! In this post you'll get know how to do just that :) STEP #1 : Creating the File Create a text file (let's say unp.txt ) Type the Username in first line and password in next line. save the file. STEP #2 : The Code! Create a class (let's say Mechanisms ) with one method for getting the input from user for username and password (and) another method for comparing the user inputs with the username and password in the file. Here's the code for the Mechanisms class. class Mechanisms { char username[100]; char password[100]; char access_name[100]; char access_word[100]; int input; int index; public: Mechanisms() { strcpy_s(username, "NoData"); strcpy_s(p...