Dos环境下用open()不能同时打开两个文件??????急急急
代码如下:
int main()
{
int handle,h2;
handle=open("c:\\test.aa",O_RDWR);
if (handle==-1)
{
printf("open h1 err");
return 0;
}
h2=open("c:\\test2.aa",O_RDWR);
if (h2==-1)
{
close(handle);
printf("open h2 err");
}
return 0;
}
c盘上肯定有test.aa test2.aa两文件,请教为什么,出现open h2 err?