最終更新日時(UTC): 2025年07月10日 01時16分39秒
Koichi Murase が更新

履歴 編集

function
<cstdio>

std::putchar

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');
}

出力

Hello

処理系

Morty Proxy This is a proxified and sanitized view of the page, visit original site.