diff options
| author | Carlos Maiolino <[email protected]> | 2025-07-10 22:24:20 +0200 |
|---|---|---|
| committer | Carlos Maiolino <[email protected]> | 2025-07-10 22:24:20 +0200 |
| commit | 869e68986aa8f69af6e7842260a68d1e5c6f796f (patch) | |
| tree | 63b6b5ffc3d19414233d4629a533c0d9bf3cbf72 /CPP/flush.cpp | |
| parent | 20834dcc57537cd95260a4a22f5d91a027adfd35 (diff) | |
Add a bunch of code
Signed-off-by: Carlos Maiolino <[email protected]>
Diffstat (limited to 'CPP/flush.cpp')
| -rw-r--r-- | CPP/flush.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/CPP/flush.cpp b/CPP/flush.cpp new file mode 100644 index 0000000..8f0eaa4 --- /dev/null +++ b/CPP/flush.cpp @@ -0,0 +1,12 @@ +#include <iostream> +#include <unistd.h> + +int main(void) { + + // This is written to a buffer, but it is not flushed immediately + std::cout << "First output"; + sleep(5); + std::cout << "Second output"; + std::cout << std::endl; + return 0; +} |
