创建文件时小心文件名

| 1 Comment | No TrackBacks
前一阵在做一个关于xml的research project的prototype,在这个项目中需要用fopen为每一个tag建立一个同名文件来保存相关的position information。结果发现在创建一个名为aux的文件时返回NULL指针,后来查阅资料原来con,aux,prn是系统保留关键字,是DOS的系统device句柄,con是标准输入输出,aux是com1,prn是printer接口。因此在创建以这三个关键字命名的文件时都会返回NULL指针,而且在创建以con.,aux.,prn. 为前缀的文件时也会返回空指针,例如创建aux.a文件,prn.xn文件等等。

No TrackBacks

TrackBack URL: http://lua.me/cgi-bin/mt/mt-tb.cgi/5

1 Comment

What is captcha code?, pls provide me captcha code codes or plugin, Thanks in advance.

Leave a comment

Recent Comments

  • Myron Nies: What is captcha code?, pls provide me captcha code codes read more

About this Entry

This page contains a single entry by Jiang published on August 11, 2008 8:42 AM.

奥运 was the previous entry in this blog.

Brisbane Ekka Show is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.