write a character string directly to the console
#include <conio.h> int cputs( const char *buf );
The cputs() function writes the character string pointed to by buf directly to the console using the putch() function. Unlike the puts() function, the carriage-return and line-feed characters are not appended to the string. The terminating null character is not written.
#include <conio.h>
void main()
{
char buffer[82];
buffer[0] = 80;
cgets( buffer );
cputs( &buffer[2] );
putch( '\r' );
putch( '\n' );
}
WATCOM
| Safety: | |
|---|---|
| Interrupt handler | No |
| Signal handler | Yes, but modifies errno |
| Thread | Yes |
errno, fputs(), putch(), puts()