| 初始化 (1) | explicit basic_ostream (basic_streambuf<char_type,traits_type>* sb); |
|---|
| 初始化 (1) | explicit basic_ostream (basic_streambuf<char_type,traits_type>* sb); |
|---|---|
| 复制 (2) | basic_ostream& (const basic_ostream&) = delete; |
| 移动 (3) | protected: basic_ostream& (basic_ostream&& x); |
|
|
test.txt。然后将缓冲区作为参数传递给 ostream 构造函数,将其与流关联。ostream 类对象很少被直接构造。通常会使用派生类(如标准的 basic_ofstream 和 basic_ostringstream)。