请输入您要查询的百科知识:

 

词条 cputs
释义

函数名: cputs

功 能: 在当前光标处向文本屏幕输出字符串str,光标自动右移字符串长度个字符位置。 用 法:在TC2.0中函数原型是 int cputs(const char *str); ,因此TC2.0中如偶该函数调用成功函数返回最后一个输出的字符;在VC6.0中,函数原型描述为:int _cputs( const char *string );,若成功则返回0,否则返回一个非0值。

程序例1:(VC6.0中运行通过)

#include <conio.h>

int main(void)

{

/* 输出一些文本 */

cputs("This is within the window\\r\");

/* 等待按键 */

getch();

return 0;

}

程序例2:(TC2.0中运行通过)

#include <stdio.h>

int main(void)

{

/* clear the screen */

clrscr();

/* create a text window */

window(10, 10, 80, 25);

/* output some text in the window */

cputs("This is within the window\\r\");

/* wait for a key */

getch();

return 0;

}

随便看

 

百科全书收录4421916条中文百科知识,基本涵盖了大多数领域的百科知识,是一部内容开放、自由的电子版百科全书。

 

Copyright © 2004-2023 Cnenc.net All Rights Reserved
更新时间:2025/3/17 3:10:27