私は最初のCプログラムを作成しています。このプログラムはパスワードを暗号化する必要があります。しかし、問題がある:私に多くのエラーを与えるが、私はそれを修正する方法がわからない。 誰でもそれを修正して、私のプログラムがなぜ動かないのか教えていただけますか? これらのエラーです:私のプログラムがなぜ機能しないのですか?
psw-crypter.C: In function ‘void cripta_password()’:
psw-crypter.C:6:41: warning: format ‘%d’ expects argument of type ‘int*’, but argument 2 has type ‘char*’ [-Wformat=]
int psw = scanf("%d", &i);
^
psw-crypter.C: In function ‘int main()’:
psw-crypter.C:18:26: warning: format ‘%d’ expects argument of type ‘int*’, but argument 2 has type ‘char*’ [-Wformat=]
int psw = scanf("%d", &i);
^
psw-crypter.C:19:23: error: invalid conversion from ‘void (*)()’ to ‘int’ [-fpermissive]
int passwordfinale = cripta_password;
^
..andこれは私のコードです:
#include <stdio.h>
void cripta_password() {
char i;
int psw = scanf("%d", &i);
int psw1 = psw % 10;
for(int number = psw1; number < psw1;psw1++) {
int psw2 = psw1 * psw1;
int psw3 = psw2 % psw1;
int pswcript = psw3 + 3.14;
}
}
int main() {
printf("Cripta la tua password!");
char i;
int psw = scanf("%d", &i);
int passwordfinale = cripta_password;
printf("La tua password completa è:");
printf("%d", passwordfinale);
}
うん、私は答えましたが、読んだ後、私は彼の恐ろしい過ちを見て、質問のこの種を依頼する恥... –