Please help me figure out how to properly close the file in this function? If you frequently call the function, you get serious errors “Error opening file: Too many open files”
int urez(){ int fh; fh=open("d:\\1.txt", O_RDWR|O_CREAT, S_IREAD|S_IWRITE); chsize(fh,2); /* как правильно закрыть файл? fclose(???) fclose(fh); --- не работает */ return 0; }