대체 어디가 오류인지....
죄암죄암
2023.04.01
질문 제목 : 질문 내용 :
#include stdio.h
#include stdlib.h
#include string.h
int main()
{
file* file;
char arr[30];
file=fopen(data.txt,w+t);
if(file==null) {
printf(file open error!);
system(pause);
exit(1); }
fprintf(file,123\n\n);
fflush(stdout);
fflush(stdin);
fscanf(file,%s,arr);
printf(%s,arr);
fclose(file);
system(pause);
return 0;
}
책에 w+는 읽고 쓰는 게 가능하지만 버퍼를 비워 줘야 된다고 해서
일단 둘 다 지워줘 봤거든요...
근데 실행하면 이상한 오류가 뜨네요
이렇게....
뭐가 문젤까요