الفريق العربي للبرمجةأرشيف المنتديات · 2000 – 2023
نسخة أرشيفية للقراءة فقط — التسجيل والمشاركة مغلقان، والمحتوى محفوظ كما كان.

الرجاء تصحيح ..لا تهملوني رجاء لاني محتاج ضروري

بدأه layaayda في 29 سبتمبر 2011 · 0 رد · 321 مشاهدة · في ارشيف قسم C/C++
مشاركة: واتساب X فيسبوك تيليجرام
#1

السلام عليكم ورحمة الله

قمت بعمل فونكشن للتسجيل الدخول

ولكن فيها بعض المشاكل الرجاء التصحيح من اهل الخبره

void fLogin(){
     char Login2[30],Password2[30];
	 int erreur3;
     erreur3=1;
      textbackground(9);
 clrscr();
t60_40();
cdrscr();     
   do{ 


         gotoxy(24,15); textcolor(7); cprintf(">>------<< Mon compte >>-------<<");

     utilisateurs=fopen("Members.txt","r");
     if(fopen==NULL)
      menu();

	 fscanf(utilisateurs,"%s %s %s %s %s\n",&sj.Nom,&sj.Prenom,&sj.D_Naissance,&sj.Login,&sj.Password);

     while(erreur3<=3){		 

	   gotoxy(25,21); textcolor(5); cprintf("Login:");
	   gotoxy(25,22); textcolor(5); cprintf("Password:");

	   gotoxy(34,21); textcolor(7); scanf("%s",&Login2);
	   gotoxy(34,22); textcolor(7); textbackground(7); cscanf("%s",&Password2);

	  if((strcmp(sj.Login,Login2)==0)&&(strcmp(sj.Password,Password2)==0)){

	   gotoxy(25,23); textcolor(5); cprintf("Nom        : %s",sj.Nom);
	   gotoxy(25,24); textcolor(5); cprintf("Prenom     : %s",sj.Prenom);
	   gotoxy(25,25); textcolor(5); cprintf("D.Naissance: %s",sj.D_Naissance);	  	   
	   gotoxy(25,26); textcolor(5); cprintf("Login      : %s",sj.Login);
       gotoxy(25,27); textcolor(5); cprintf("Password   : "); textbackground(5); cprintf("%s",sj.Password);
	   }else{	   
                   gotoxy(20,31); textcolor(4); cprintf("Vous avez entre un nom ou mot de passe invalide");
		           gotoxy(20,32); textcolor(4); cprintf("Vous avez utilise %d sur 3 tentatives de connexion",erreur3);
       	           gotoxy(25,33); textcolor(9); cprintf("Entrer UN AUTRE Login(O/N)?:");
		           gotoxy(54,33);scanf("%s",&sj.reponse);
	            erreur3++;
             if(erreur3>3){
		                 fclose(utilisateurs);
			             gotoxy(25,33); textcolor(7); cprintf("Vous avez utilisé 3 sur 3 tentatives de connexion");
			             getch();
			             fRegister();
                         }			
		    }       

				   }	   
   }while((sj.reponse!='n')&&(sj.reponse!='N'));
   getch();   
   menu();
}

والله يرحمم الوالدين

مواضيع مشابهة

عدد الزوار حالياً

المتواجدون خلال آخر دقيقتين · يتحدّث كل ٣٠ ثانية

—الإجمالي—أعضاء مسجّلون—زوار بدون تسجيل

جارٍ التحقق من المتواجدين…