Export (0) Print
Expand All
Expand Minimize
This topic has not yet been rated - Rate this topic

_putch, _putwch

Write a character to the console.

int _putch(
   int c 
);
wint_t _putwch(
   wchar_t c
);

Parameter

c
Character to be output.

Return Value

Returns c if successful. If _putch fails, it returns EOF; if _putwch fails, it returns WEOF.

Remarks

These functions write the character c directly, without buffering, to the console. In Windows NT, _putwch writes Unicode characters using the current console locale setting.

Generic-Text Routine Mappings

TCHAR.H routine _UNICODE & _MBCS not defined _MBCS defined _UNICODE defined
_puttch _putch _putch _putwch

Requirements

Routine Required header Compatibility
_putch <conio.h> Win 98, Win Me, Win NT, Win 2000, Win XP
_putwch <conio.h> Win 98, Win Me, Win NT, Win 2000, Win XP

For additional compatibility information, see Compatibility.

Libraries

All versions of the C run-time libraries.

Example

See the example for _getch.

See Also

Console and Port I/O Routines | _cprintf | _getch | Run-Time Routines and .NET Framework Equivalents

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.