Skip to content

Commit

Permalink
fix(basic_filebuf): is_openの例の微調整と出力の追加
Browse files Browse the repository at this point in the history
  • Loading branch information
yumetodo committed Dec 11, 2019
1 parent 9f2709b commit 83f853d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion reference/fstream/basic_filebuf/is_open.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ bool is_open() const;

int main()
{
std::fstream fs("foo");
std::fstream fs("foo", std::ios_base::out);
std::filebuf* buf = fs.rdbuf();

if (buf->is_open()) {
Expand All @@ -36,6 +36,12 @@ int main()
* rdbuf()[link /reference/fstream/basic_fstream/rdbuf.md]
* is_open()[link ff0000]

### 出力

```
opened
```

## バージョン
### 言語
- C++98

0 comments on commit 83f853d

Please sign in to comment.