Command Prompt for Windows




putch, putwch, _puttch

int putch(const int c);
int putwch(const int c);
int _puttch(const int c);

Display a character c directly to the screen.

Parameter Description
c Character value.

Returns

Returns the character c.

Comments

Function putch() writes directly to the screen, and as a result is not streamable.

Tab characters are padded with space characters.

See Also

printf, putx, puts, putchar, getch

Example

void myerror(char *msg)
{
    textcolor(COL_ERROR);       /* display message in COL_ERROR */

    while (*msg)        /* display message */
        putch(*msg++);

    putch('\n');0
}