网络编程 | 站长之家 | 网页制作 | 图形图象 | 操作系统 | 冲浪宝典 | 软件教学 | 网络办公 | 邮件系统 | 网络安全 | 认证考试 | 系统进程
Firefox | IE | Maxthon | 迅雷 | 电驴 | BitComet | FlashGet | QQ | QQ空间 | Vista | 输入法 | Ghost | Word | Excel | wps | Powerpoint
asp | .net | php | jsp | Sql | c# | Ajax | xml | Dreamweaver | FrontPages | Javascript | css | photoshop | fireworks | Flash | Cad | Discuz!
当前位置 > 网站建设学院 > 网络编程 > C/C++
Tag:注入,存储过程,分页,安全,优化,xmlhttp,fso,jmail,application,session,防盗链,stream,无组件,组件,md5,乱码,缓存,加密,验证码,算法,cookies,ubb,正则表达式,水印,索引,日志,压缩,base64,url重写,上传,控件,Web.config,JDBC,函数,内存,PDF,迁移,结构,破解,编译,配置,进程,分词,IIS,Apache,Tomcat,phpmyadmin,Gzip,触发器,socket
网络编程:ASP教程,ASP.NET教程,PHP教程,JSP教程,C#教程,数据库,XML教程,Ajax,Java,Perl,Shell,VB教程,Delphi,C/C++教程,软件工程,J2EE/J2ME,移动开发
本月文章推荐
.一般线性链表类的C++实现.
.PE文件格式详解(3).
.水滴石穿C语言之可变参数问题.
.浅薄与偏见 驳“C语言已经死了”.
.在VBA中调用AUTOCAD打印文件.
.C++初学者应该关心的优秀图书一览.
.C语言教程第八章:枚举,位运算.
.C++ 中园形三角形按钮的实现.
.C++习题与解析-模板.
.C语言:黑客学员必修课(一).
.用标准C实现shell功能.
.体验C++中接口与实现分离的技术.
.C++的底层机制.
.C++中的引用(1).
.C++中利用构造函数与无名对象简化.
.1999年4月全国计算机等级考试二级.
.用DEF文件从DLL中导出C++类.
.C++模板元编程技术研究.
.C++箴言:声明为非成员函数时机.
.简单图形模拟吃豆游戏.

C语言库函数(W类字母)

发表日期:2008-3-8


     
函数名: wherex
功  能: 返回窗口内水平光标位置
用  法: int wherex(void);
程序例: 

#include <conio.h> 

int main(void)
{
   clrscr();
   gotoxy(10,10);
   cprintf("Current location is X: %d  Y: %d\r\n", wherex(), wherey());
   getch(); 

   return 0;
}
 
 
  

函数名: wherey
功  能: 返回窗口内垂直光标位置
用  法: int wherey(void);
程序例: 

#include <conio.h> 

int main(void)
{
   clrscr();
   gotoxy(10,10);
   cprintf("Current location is X: %d  Y: %d\r\n", wherex(), wherey());
   getch(); 

   return 0;
}
 
 
  

函数名: window
功  能: 定义活动文本模式窗口
用  法: void window(int left, int top, int right, int bottom);
程序例: 

#include <conio.h> 

int main(void)


   window(10,10,40,11);
   textcolor(BLACK);
   textbackground(WHITE);
   cprintf("This is a test\r\n"); 

   return 0;
}
 
 
  

函数名: write
功  能: 写到一文件中
用  法: int write(int handel, void *buf, int nbyte);
程序例: 

#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <sys\stat.h>
#include <io.h>
#include <string.h> 

int main(void)
{
   int handle;
   char string[40];
   int length, res; 

   /*
    Create a file named "TEST.$$$" in the current Directory and write
    a string to it.  If "TEST.$$$" already exists, it will be overwritten.
   */ 

   if ((handle = open("TEST.$$$", O_WRONLY  O_CREAT  O_TRUNC,

                         S_IREAD  S_IWRITE)) == -1)
   {
      printf("Error opening file.\n");
      exit(1);
   } 

   strcpy(string, "Hello, world!\n");
   length = strlen(string); 

   if ((res = write(handle, string, length)) != length)
   {
      printf("Error writing to the file.\n");
      exit(1);
   }
   printf("Wrote %d bytes to the file.\n", res); 

   close(handle);
   return 0;
}
上一篇:C语言库函数(S类字母) 人气:628
下一篇:C/C++ 编译器和调试器以及静态库、动态库使用汇总(1) 人气:1328
浏览全部C/C++的内容 Dreamweaver插件下载 网页广告代码 祝你圣诞节快乐 2009年新年快乐