楼上两位:
open("a.txt",O_CREAT|O_RDWR|O_BINARY);
增加参数O_BINARY,用GCC调试为什么会有这样的错误?
“O_BINARY“ undeclared (first use in this function)
(each undeclared identifier is repor ted only once for each function if appearsin)
//===============================
int main()
{
int f;
char tt[]="abc";
f=open("a.txt,O_RDWR|O_CREAT|O_BINARY);
write(f,tt,3)
return 0;
}