Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- #include<stdio.h>
- #include<cstdlib>
- #include<cstring>
- #include<iomanip>
- #include<windows.h>
- using std::setw;
- using namespace std;
- void UserPass( char pass[],char username[] ,const int n,const int m){
- cout<<"\nUsername: ";
- cin>>username;
- fflush(stdin);
- cout<<"\nPassword: ";
- cin>>pass;
- }
- void Scelta(char pass[], char username [],const int n,const int m ){
- fflush(stdin);
- char scelta;
- cout<<"\nVuoi salvare la tua pass e user in .txt? Y o N: ";
- cin>>scelta;
- switch(scelta){
- case 'Y':
- case 'y':
- cout<<"\nAcquisizione dati...\n";
- Sleep(3000);
- FILE *fp;
- fp=fopen("Salvataggio.txt","w");
- if(fp==NULL){
- cout<<"Errore apertura file!";
- }
- fprintf(fp," ____________FACEBOOK-DEV 2.0__________ \n");
- fprintf(fp, "La tua username: ");
- fprintf(fp,"%s",username);
- fclose(fp);
- FILE *fp1;
- fp1=fopen("Salvataggio.txt","a");
- if(fp1==NULL){
- cout<<"Errore apertura file!";
- }
- fprintf(fp1, "\nLa tua password: ");
- fprintf(fp1,"%s",pass);
- fprintf(fp1,"\n ______NON RISPONDERE A QUESTA MAIL- AUTOMATICA______ \n");
- fclose(fp1);
- cout<<"\nControlla nella cartella!!! "<<endl;
- Sleep(2000);
- break;
- default:
- cout<<"Grazie per averci scelto!! ";
- break;
- }
- }
- int main () {
- const int n=40;
- const int m=40;
- char pass[m],username[n];
- cout<<" ______________FACEBOOK-DEV 2.0______________ \n";
- cout<<"\nDigita 10 cartteri per User - 8 caratteri per Pass ";
- UserPass(pass,username,n,m);
- Scelta(pass,username,n,m);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement