namespace std {
template<class CharT, class Traits, class Allocator>
std::basic_ostream<CharT, Traits>&
operator<<(std::basic_ostream<CharT, Traits>& os,
const basic_string<CharT, Traits, Allocator>& s);
}
概要
文字列をストリームへ出力する。
効果
sentryオブジェクトを構築する。sentryオブジェクトが失敗を示した場合、何もしない。- 仮引数
sが指し示す文字列を出力する。width()とflags() & (ios_base::adjustfield)に従ってパディングの出力も行う。
width(0)を呼び出す。
戻り値
os
例
#include <iostream>
#include <string>
int main() {
std::string s = "Tuna";
std::cout << s << std::endl;
}
出力例
Tuna
実装例
TBD
バージョン
言語
- C++98
参照
- このほかの
<<演算子関数