_cputs

Puts a string to the console.

int _cputs( const char *string );

Routine Required Header Compatibility
_cputs <conio.h> Win 95, Win NT

For additional compatibility information, see Compatibility in the Introduction.

Libraries

LIBC.LIB Single thread static library, retail version
LIBCMT.LIB Multithread static library, retail version
MSVCRT.LIB Import library for MSVCRT.DLL, retail version

Return Value

If successful, _cputs returns a 0. If the function fails, it returns a nonzero value.

Parameter

string

Output string

Remarks

The _cputs function writes the null-terminated string pointed to by string directly to the console. A carriage return–linefeed (CR-LF) combination is not automatically appended to the string.

Example

/* CPUTS.C: This program first displays
 * a string to the console.
 */

#include <conio.h>

void main( void )
{
   /* String to print at console. 
    * Note the \r (return) character. 
    */
   char *buffer = "Hello world (courtesy of _cputs)!\r\n";

   _cputs( buffer );
}

Output

Hello world (courtesy of _cputs)!
 

Console and Port I/O Routines

See Also   _putch