摘要: filename 必需。规定要打开的文件或 URL。 mode 必需。规定要求到该文件/流的访问类型。可能的值见下表。 include_path 可选。如果也需要在 include_path 中检索文件的话,可以将该参数设为 1 或 TRUE。 context 可选。规定文件句柄的环境。Context 是可以修改流的行为的一套选项。 "r" 只读方式打开,将文件指针指向文件头。 "r+" 读写方式打开,将文件指针指向文件头。 "w" 写入方式打开,将文件指针指向文件头并将文件大小截为零。如果文件不存在则尝试创建之。 "w+& 阅读全文
posted @ 2013-03-05 21:51 王井玉 阅读(205) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h>#include <dos.h>int main(){ /*getdate()函数的用法*/ struct date d; getdate(&d); //获取DOS日期 printf("the current year is:%d\n",d.da_year);//cprintf和printf用法是不同的 printf("the current day is:%d\n",d.da_day); printf("the current month is:%d\n",d.da 阅读全文
posted @ 2013-03-05 09:11 王井玉 阅读(1399) 评论(0) 推荐(0) 编辑
摘要: #include <conio.h>int main(void){ /*gotoxy()的用法*/ //clrscr(); //清除文本模式的窗口 gotoxy(2,1);//在文本窗口中设置光标用(列,行) cprintf("Hello world");//送格式化输出至屏幕 getch(); return 0;} 阅读全文
posted @ 2013-03-05 07:44 王井玉 阅读(1046) 评论(0) 推荐(0) 编辑