ofstream shadow,salt;
ifstream shadowread,saltread;
login:
cout << "Enter your login id" << endl;
cin >> user;
shadowread.open("salt.txt");
while(!shadowread.eof())
{
    getline(shadowread, usercmp, ":");
    shadowread.close();
    if (usercmp == user)
    {
        int captcha = rand() % 10;
        int read;
        cout << "Enter the captcha" << captcha << endl;
        cin >> read ;
        if (captcha == read)
        {
            goto enterpw;
        }
        else
            goto login;
    }
}
txt file
root:password:2
How to read the password category?
 
     
    