我正在try 访问文件,但访问目录时遇到问题.
我的Windows是葡萄牙语的,所以Área de Trabalho
等于Desktop
.
#include <stdio.h>
int main() {
FILE *file;
file = fopen("C://Users//gluci//OneDrive//Área de Trabalho//Automatos//teste.txt", "w");
fprintf(file, "abcde");
fclose(file);
return 0;
}
我试过使用/
、\
、//
、\\
,但似乎都不起作用.当我没有传递特定的目录时,程序会正常工作.