The problem is that passwords are only available in a one-way encode on the server. So the only way to check is to try it.
Well, actually you can; there are libraries that will encode a password for you; you can then check it against the encode saved when the password is first entered. How good are your c++ skills ?