Not
Bu sayfaya erişim yetkilendirme gerektiriyor. Oturum açmayı veya dizinleri değiştirmeyi deneyebilirsiniz.
Bu sayfaya erişim yetkilendirme gerektiriyor. Dizinleri değiştirmeyi deneyebilirsiniz.
<ostream> Üst bilgi aşağıdaki işleçleri sağlar:
operator<<
Akışa çeşitli türler yazar.
template <class _Elem, class _Tr>
basic_ostream<_Elem, _Tr>& operator<<(
basic_ostream<_Elem, _Tr>& _Ostr,
const Elem* str);
template <class _Elem, class _Tr>
basic_ostream<_Elem, _Tr>& operator<<(
basic_ostream<_Elem, _Tr>& _Ostr,
Elem _Ch);
template <class _Elem, class _Tr>
basic_ostream<_Elem, _Tr>& operator<<(
basic_ostream<_Elem, _Tr>& _Ostr,
const char* str);
template <class _Elem, class _Tr>
basic_ostream<_Elem, _Tr>& operator<<(
basic_ostream<_Elem, _Tr>& _Ostr,
char _Ch);
template <class _Tr>
basic_ostream<char, _Tr>& operator<<(
basic_ostream<char, _Tr>& _Ostr,
const char* str);
template <class _Tr>
basic_ostream<char, _Tr>& operator<<(
basic_ostream<char, _Tr>& _ostr,
char _Ch);
template <class _Tr>
basic_ostream<char, _Tr>& operator<<(
basic_ostream<char, _Tr>& _Ostr,
const signed char* str);
template <class _Tr>
basic_ostream<char, _Tr>& operator<<(
basic_ostream<char, _Tr>& _Ostr,
signed char _Ch);
template <class _Tr>
basic_ostream<char, _Tr>& operator<<(
basic_ostream<char, _Tr>& _Ostr,
const unsigned char* str);
template <class _Tr>
basic_ostream<char, _Tr>& operator<<(
basic_ostream<char, _Tr>& _Ostr,
unsigned char _Ch);
template <class _Elem, class _Tr, class T>
basic_ostream <_Elem, _Tr>& operator<<(
basic_ostream<_Elem, _Tr>&& _Ostr,
Ty val);
Parametreler
_Caner
Bir karakter.
_Elem
Öğe türü.
_Ostr
Bir basic_ostream nesnesi.
str
Karakter dizesi.
_Tr
Karakter özellikleri.
Val
Türü
Dönüş Değeri
Akış.
Açıklamalar
basic_ostream sınıfı ayrıca birkaç ekleme işleci tanımlar. Daha fazla bilgi için bkz. basic_ostream::operator<<.
Şablon işlevi
template <class _Elem, class _Tr>
basic_ostream<Elem, _Tr>& operator<<(
basic_ostream<Elem, _Tr>& _ostr,
const Elem *str);
, str'de başlayan dizinin N = traits_type::uzunluk() uzunluğunustr belirler ve diziyi ekler. N <_Ostr.genişliği ise, işlev - N dolgu karakterlerinin yinelemesini _Ostr.width de ekler. Yineleme, diziden önce (_Ostr.
bayraklar & adjustfield != sol. Aksi takdirde, yineleme dizisini izler. işlevi _Ostr döndürür.
Şablon işlevi
template <class _Elem, class _Tr>
basic_ostream<Elem, _Tr>& operator<<(
basic_ostream<Elem, _Tr>& _Ostr,
Elem _Ch);
öğesini _Chekler. 1 <_Ostr.widthise, işlev ayrıca - 1 doldurma karakteri yinelemesi _Ostr.width ekler. yinelemesi ise _Ostr.flags & adjustfield != leftdiziden önce ulaşır. Aksi takdirde, yineleme dizisini izler. _Ostr döndürür.
Şablon işlevi
template <class _Elem, class _Tr>
basic_ostream<Elem, _Tr>& operator<<(
basic_ostream<Elem, _Tr>& _Ostr,
const char *str);
ile aynı şekilde davranır
template <class _Elem, class _Tr>
basic_ostream<Elem, _Tr>& operator<<(
basic_ostream<Elem, _Tr>& _Ostr,
const Elem *str);
ancak her öğe _Ch str'debaşlayan dizinin putElem_Ostr. türündeki bir nesneye dönüştürülür.
Şablon işlevi
template <class _Elem, class _Tr>
basic_ostream<Elem, _Tr>& operator<<(
basic_ostream<Elem, _Tr>& _Ostr,
char _Ch);
ile aynı şekilde davranır
template <class _Elem, class _Tr>
basic_ostream<Elem, _Tr>& operator<<(
basic_ostream<Elem, _Tr>& _Ostr,
Elem _Ch);
_Ch çağrılarak Elemtüründe _Ostr.put( _Ostr.widen( _Ch )) bir nesneye dönüştürülmesi dışında.
Şablon işlevi
template <class _Tr>
basic_ostream<char, _Tr>& operator<<(
basic_ostream<char, _Tr>& _Ostr,
const char *str);
ile aynı şekilde davranır
template <class _Elem, class _Tr>
basic_ostream<Elem, _Tr>& operator<<(
basic_ostream<Elem, _Tr>& _Ostr,
const Elem *str);
(Öğeleri eklemeden önce genişletmesi gerekmez.)
Şablon işlevi
template <class _Tr>
basic_ostream<char, Tr>& operator<<(
basic_ostream<char, _Tr>& _Ostr,
char _Ch);
ile aynı şekilde davranır
template <class _Elem, class _Tr>
basic_ostream<Elem, _Tr>& operator<<(
basic_ostream<Elem, _Tr>& _Ostr,
Elem _Ch);
(Eklemeden önce _Ch genişletmesi gerekmez.)
Şablon işlevi
template <class _Tr>
basic_ostream<char, _Tr>& operator<<(
basic_ostream<char, _Tr>& _Ostr,
const signed char *str);
döndürür _Ostr << (const char *)str.
Şablon işlevi
template <class _Tr>
basic_ostream<char, _Tr>& operator<<(
basic_ostream<char, _Tr>& _Ostr,
signed char _Ch);
döndürür _Ostr << (char)_Ch.
Şablon işlevi:
template <class _Tr>
basic_ostream<char, _Tr>& operator<<(
basic_ostream<char, _Tr>& _Ostr,
const unsigned char *str);
döndürür _Ostr << (const char *)str.
Şablon işlevi:
template <class _Tr>
basic_ostream<char, _Tr>& operator<<(
basic_ostream<char, _Tr>& _Ostr,
unsigned char _Ch);
döndürür _Ostr << (char)_Ch.
Şablon işlevi:
template <class _Elem, class _Tr, class T>
basic_ostream<_Elem, _Tr>& operator<<(
basic_ostream<char, _Tr>&& _Ostr,
T val);
döndürür _Ostr << val (ve RValue Başvuruyu işlemdeki bir lvalue'ya _Ostr dönüştürür).
Örnek
Kullanma örneği için bkz. operator<<.