⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ostrchar.cpp

📁 C标准库源代码
💻 CPP
字号:
/***
* ostrchar.cpp - definitions for ostream class operator<<(char) functions.
*
*       Copyright (c) 1991-1997, Microsoft Corporation.  All rights reserved.
*
*Purpose:
*       Contains the member function definitions for ostream operator<<(char).
*
*******************************************************************************/

#include <cruntime.h>
#include <internal.h>
#include <iostream.h>
#pragma hdrstop

// note: called inline by char and signed char versions:
ostream&  ostream::operator<<(unsigned char c)
{
    if (opfx())
        {
        if (x_width)
            {
            _WINSTATIC char outc[2];
            outc[0] = c;
            outc[1] = '\0';
            writepad("",outc);
            }
        else if (bp->sputc(c)==EOF)
            {
            if (bp->overflow(c)==EOF)
                state |= (badbit|failbit);  // fatal error?
            }
        osfx();
        }
    return *this;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -