Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
MacroModel committed Dec 1, 2024
1 parent c5bc8ef commit d8d30ce
Showing 1 changed file with 1 addition and 16 deletions.
17 changes: 1 addition & 16 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ int main()
::fast_io::io::print(::fast_io::c_stdout(), "Equivalent to the function above\n");
}
```
### Output to `native stdout`
### Output to `native stdout` (Unbuffered)
* on non-windows systems (fd): (int)1
* on win32 (handle): GetStdHandle(STD_OUTPUT_HANDLE)
* on nt (handle): RtlGetCurrentPeb()->ProcessParameters->StandardOutput
Expand Down Expand Up @@ -51,21 +51,6 @@ int main()
::fast_io::io::scan(::fast_io::c_stdin(), i);
}
```
### Scan from `native stdin`
* Note: scanning will read the data in native stdin into the buffer and clear some data in native stdin
* on non-windows systems (fd): (int)0
* on win32 (handle): GetStdHandle(STD_INPUT_HANDLE)
* on nt (handle): RtlGetCurrentPeb()->ProcessParameters->StandardInput
```cpp
#include <fast_io.h>

int main()
{
::fast_io::basic_ibuf<::fast_io::native_io_observer> ibf_in{::fast_io::in()};
int i;
::fast_io::io::scan(ibf_in, i);
}
```
### Additional Samples

For up-to-date examples, refer to the [`examples/`](examples/) directories.
Expand Down

0 comments on commit d8d30ce

Please sign in to comment.