Skip to content

Commit

Permalink
feat(basic_fstream): add close()
Browse files Browse the repository at this point in the history
  • Loading branch information
yumetodo committed Dec 14, 2019
1 parent 019f014 commit 69d2126
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 2 deletions.
4 changes: 2 additions & 2 deletions reference/fstream/basic_fstream.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ namespace std {
| `swap` | 値の交換 | C++11 |
| [`rdbuf`](basic_fstream/rdbuf.md) | ストリームバッファオブジェクトの取得 | |
| [`is_open`](basic_fstream/is_open.md) | ファイルを開いているかの判定 | |
| [`open`](basic_fstream/open.md) | ファイルを開く | |
| `close` | ファイルを閉じる | |
| [`open`](basic_fstream/open.md) | ファイルを開く | |
| [`close`](basic_fstream/close.md) | ファイルを閉じる | |
## 非メンバ関数
Expand Down
44 changes: 44 additions & 0 deletions reference/fstream/basic_fstream/close.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# close
* fstream[meta header]
* std[meta namespace]
* basic_fstream[meta class]
* function[meta id-type]

```cpp
void close();
```

## 概要

ファイルを閉じる

## 戻り値

[`rdbuf()->close()`](/reference/fstream/basic_filebuf/close.md)

##

```cpp example
#include <iostream>
#include <fstream>

int main()
{
std::fstream fs("foo");
fs.close();
std::cout << std::boolalpha << fs.is_open() << std::endl;
}
```
* std::fstream[link /reference/fstream/basic_fstream.md]
* std::boolalpha[link /reference/ios/boolalpha.md]
* close()[color ff0000]

### 出力

```
false
```

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

0 comments on commit 69d2126

Please sign in to comment.