Skip to content

Latest commit

 

History

History
43 lines (35 loc) · 796 Bytes

File metadata and controls

43 lines (35 loc) · 796 Bytes

putchar

  • cstdio[meta header]
  • std[meta namespace]
  • function[meta id-type]
namespace std {
  int putchar(int c);
}

概要

標準出力に1文字出力する。

これは、putc(c, stdout)と等価である。

戻り値

成功すれば書き込んだ文字を、失敗すればEOFを返す。

#include <cstdio>

int main() {
  std::putchar('H');
  std::putchar('e');
  std::putchar('l');
  std::putchar('l');
  std::putchar('o');
  std::putchar('\n');
}
  • std::putchar[color ff0000]

出力

Hello

処理系