0
我剛安裝了mingw。我正在測試它。我只寫了一個簡單的程序。但它給錯誤。這個問題可能是什麼?mingw錯誤,同時掃描一個字符串
int main()
{
char name[10];
printf("Enter your name\t");
scanf("%s", &name);
printf("Hello %s",name);
return 0;
}
和錯誤是,
- format '%s' expects argument of type 'char *', but argument 2 has type 'char (*)[10]' [-
Wformat]
- Line breakpoint: sorts.c [line: 16]
項目中仍存在錯誤。無法打開輸出文件,拒絕test1.exe權限。我修好之後。在發佈這個問題之前,我做了你所說的,但是發生了許可問題。 –
@ShreyasKale打開一個新的問題,你解釋你如何編譯你的程序和你得到什麼錯誤。 – ouah
好的,無論如何。 –