• Hello everyone, I am new to c++ and have a piece of code from an assignment that should validate a user's password. I think the code I have does not check user's input but then I could be wrong. Any help with this would be great. Thanks.

    #include "serverultils.h"
    #include "utils.h"
    #include "DBConn.h"
    #include <unistd.h> 
    int authenticate (SSL* sslsock, sql::Connection* db, std::string** out)
        std::string username;
        std::string password;
        username = rcvString(sslsock);
        password = rcvString(sslsock);
        if (dbauthenticate(db, username, password) != 0)
            return -1;
        *out = new std::string(username);
        sendInt(sslsock, (int8_t) 0);
        return 0;