to alphapaopao(炮炮): 你的意见我不敢苟同 fopen是标准c的接口函数 能够用于windows和unix平台 而绝不是为了兼容性而保留的 详见msdn:Compatibility The Microsoft run-time library supports American National Standards Institute (ANSI) C and UNIX® C. In this book, references to UNIX include XENIX®, other UNIX-like systems, and the POSIX subsystem in Windows NT and Windows 95. The description of each run-time library routine in this book includes a compatibility section for these targets: ANSI, Windows 95 (listed as Win 95), and Windows NT (Win NT). All run-time library routines included with this product are compatible with the Win32 API.
GetLastErorr()可以返回上一个系统的错误。
============================================================================
DocWizard C++ 程序文档生成工具 http://www.betajin.com/alphasun/index.htm
to I_168_888(瓜棚下):
fopen函数在win32平台上最终还是要调用这些API函数的啊
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~谁说的?
检查一下这个文本文件是否在exe文件执行的目录下
如果是debug状态要copy到debug目录下
DocWizard C++ 程序文档生成工具 http://www.betajin.com/alphasun/index.htm
你的意见我不敢苟同
fopen是标准c的接口函数
能够用于windows和unix平台
而绝不是为了兼容性而保留的
详见msdn:Compatibility
The Microsoft run-time library supports American National Standards Institute (ANSI) C and UNIX® C. In this book, references to UNIX include XENIX®, other UNIX-like systems, and the POSIX subsystem in Windows NT and Windows 95. The description of each run-time library routine in this book includes a compatibility section for these targets: ANSI, Windows 95 (listed as Win 95), and Windows NT (Win NT). All run-time library routines included with this product are compatible with the Win32 API.