cputs
Remonter à Conio.h - Index
Header File
conio.h
Category
Console I/O Routines
Prototype
int cputs(const char *str);
Description
Writes a string to the screen.
cputs writes the null-terminated string str to the current text window. It does not append a newline character.
The string is written either directly to screen memory or by way of a BIOS call, depending on the value of the global variable _directvideo. Unlike puts, cputs does not translate linefeed characters (\n) into carriage-return/linefeed character pairs (\r\n).
Remarque : Do not use this function in Win32 GUI applications.
Return Value
cputs returns the last character printed.
Example
#include <conio.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\n");
/* wait for a key */
getch();
return 0;
}
Portability
POSIX | Win32 | ANSI C | ANSI C++ |
---|---|---|---|
+ |