02.12.2015, 02:21
(
Последний раз редактировалось GranaT3; 02.12.2015 в 02:47.
Причина: Fix code
)
I want to know how many "GranaT3" I have in my file "name.txt"
But nothing prints (code does not work). What would be the right way ?.
Код:
new File:handle = fopen("name.txt", io_read), buf[128]; if(handle) { while(fread(handle, buf)) { if(!strcmp(buf, "GranaT3", true)) { printf("%s", buf); } } } else { print("The file \"file.txt\" does not exists, or can't be opened."); }