コード例 #1
0
void passwordChange()
{
    system("cls");

    char ch,curPass[50];
    int i=0;
    gotoxy(15,7);
       printf("Enter Current password:"******"password.txt","r");
    char passFile[50];
    if(fread(&passFile,sizeof(passFile),1,z)==1)
        ;
  //  printf("\n");
    //puts(passFile);
    //puts(curPass);

    if(strcmp(curPass,passFile)==0)
        changePass();
    else
    {
        printf("Incorrect current password");
        returnfunc();
    }
    exit(0);
}
コード例 #2
0
ファイル: prefwindow.cpp プロジェクト: kazak1377/QDiary
prefWindow::prefWindow(QWidget *parent) : QWidget(parent), ui(new Ui::prefWindow)
{
    ui->setupUi(this);
    connect(ui->checkBox,SIGNAL(clicked(bool)),this,SIGNAL(protectionChanged(bool)));
    connect(ui->pushButton,SIGNAL(clicked()),this,SLOT(changePass()));
}