Merhaba arkadaşlar,
Bugünlerde C konusunda kendimi geliştirmek istiyorum. Ama bir hatada takıldım kaldım.
kod:
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <windows.h>
char *metin1 = "herhangi bir şey";
int main () {
for(int i = 0; i < strlen(metin1); i++) {
printf(metin1[i]);
sleep(500);
}
}
hata çıktısı :
E:\Github\deneme.c: In function 'main':
E:\Github\deneme.c:10:22: warning: passing argument 1 of 'printf' makes pointer from integer without a cast [-Wint-conversion]
10 | printf(metin1[i]);
| ~~~~~~^~~
| |
| char
In file included from E:\Github\deneme.c:1:
E:/TDM-GCC/x86_64-w64-mingw32/include/stdio.h:354:25: note: expected 'const char *' but argument is of type 'char'
354 | int printf (const char *__format, ...)
| ~~~~~~~~~~~~^~~~~~~~