Borland C++ reference

cputs

raw OCR

Writes a string to the screen.

Defined in header <conio.h>

Syntax

#include <conio.h>
int cputs(const char '"*str);

Portability

DOSUNIXWindowsANSI CC++ only
■

Remarks

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).

Retum value

cputs returns the last character printed.

See also

Example

#include <conio.h>

int main(void)
{
   clrscr0;                /* clear the screen  */
   window(10, 10, 80, 25); /* create a text window  */
   /* icgoutput some text in the window */
   cputsC'This is within the window\r\n") ;
   getchO;                 /* wait for a key */'
   return 0;
}

Differences from modern implementations

Nothing recorded yet.

Modern references

These are search links, not yet checked by hand.