с lenguage , не создает файл #include <stdio.h> #include <math.h> #include <time.h> #include <string.h> int main() { int x=14,y=88,z=52; FILE *lastdance=fopen("last.txt","w"); fwrite(&x,sizeof(int),1,lastdance); fwrite(&y,sizeof(int),1,lastdance); fwrite(&z,sizeof(int),1,lastdance); fclose(lastdance); return 0; } Код #include <stdio.h> #include <math.h> #include <time.h> #include <string.h> int main() { int x=14,y=88,z=52; FILE *lastdance=fopen("last.txt","w"); fwrite(&x,sizeof(int),1,lastdance); fwrite(&y,sizeof(int),1,lastdance); fwrite(&z,sizeof(int),1,lastdance); fclose(lastdance); return 0; }
DRYG15685655, #include <stdio.h> #include <unistd.h> int main() { char cwd[1024]; if (getcwd(cwd, sizeof(cwd)) != NULL) { printf("Current working directory: %s\n", cwd); if (access(cwd, W_OK) == 0) { printf("Directory is writable.\n"); } else { perror("Directory is not writable"); } } else { perror("Error getting current directory"); } return 0; } Код #include <stdio.h> #include <unistd.h> int main() { char cwd[1024]; if (getcwd(cwd, sizeof(cwd)) != NULL) { printf("Current working directory: %s\n", cwd); if (access(cwd, W_OK) == 0) { printf("Directory is writable.\n"); } else { perror("Directory is not writable"); } } else { perror("Error getting current directory"); } return 0; } ебни это , эта хуйня должна проверять есть ли разрешение на создания файла и где он пытается создаться . Если возвращается ноль то разрешение есть , если не возвращается то тебе должно вывести причину ошибки. Потом уже можно понять в чем причина