-1
Eai personal. I need to do a work in C that I have to create files with numerical sequences and create another file with the intersection of those numbers and such... However, I can’t write these (int) in the file, like, it has to be 10 values, but at the time of running I end up entering with much more values than expected.
printf("Entre com os valores do arquivo: \n");
for(cont=1; cont <= *argv[3]; cont++) {
scanf("%c", &ch);
fputc(ch, f1);
}
*argv[3] is the size user entered for the amount of values.
Friend I believe that the error of your code is not in this specific block. I did not find any error in this part of the code.
– Fild
Why the asterisk before
argv[3]
? You don’t want the value of this position, so why take the address?– Woss