Do so
char * buff = new char[a]; b = fread(&buff[0],1,a,in); for some reason b = 0
in = fopen(filename, "r"); int b; while(b = fread(&buff[0],1,a,in)) { send(client_socket,&buff[0],b,0); i++; printf("Отправляем %d блок файла \n", i); } Do so
char * buff = new char[a]; b = fread(&buff[0],1,a,in); for some reason b = 0
in = fopen(filename, "r"); int b; while(b = fread(&buff[0],1,a,in)) { send(client_socket,&buff[0],b,0); i++; printf("Отправляем %d блок файла \n", i); } Source: https://ru.stackoverflow.com/questions/164731/
All Articles
while(feof(in))orwhile(!feof(in))? (1).D:\data.txtas entered? If as a constant in the program, how many backslashes (``) are there? (This is a common mistake) - alexlz