Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void procurafaltante(){
- string figurinha;
- int novo[681];
- FILE *arquivo;
- int i, a, numFigurinha = 0;
- int rep = 0;
- char desc_lida[50];
- for(int b = 1; b <= 681; b++){
- arquivo = fopen("repetidas.txt","r");
- long number = b;
- char buffer [128];
- int ret = snprintf(buffer, sizeof(buffer), "%ld", number);
- char * desc = buffer;
- novo[b] = rep;
- a = 0;
- while(!feof(arquivo)){
- setbuf(stdin,NULL);
- fscanf(arquivo,"%s",&desc_lida);
- if(strcmp(desc_lida,desc)==0){
- novo[b] = a+1;
- }
- }
- fclose(arquivo);
- }
- cout << novo[50] << endl;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement