klimi
Mhm
klimi
Try again
klimi
/saved
Anonymous
get cbook
klimi
That's better but still not it
klimi
Try again
klimi
/saved
Anonymous
Anonymous
Get /noendl
Anonymous
/get noendl
klimi
Good nigh ^•^
klimi
/get noendl
There you go!
Anonymous
Whats alternate to endl then?
klimi
Alternative?
klimi
std::cout << '\n' << std::flush;
klimi
This is alternative endl
Anonymous
Oohk
klimi
Buuut
klimi
I think you just asked wrong wuestion
klimi
I think you means " what I should use else?"
klimi
The answer would be just \n
klimi
It creates new line
Anonymous
Anonymous
It creates new line
But it wont flush the buffer no?
klimi
If you want alternative, that means you want all the stuff it does, all the functionality
klimi
But in fact you want to just print new line ( move the cursor down)
klimi
But it wont flush the buffer no?
The "\n" won't flush the buffer
klimi
It will just move the cursor down and to pos 0
klimi
Yes thats right
Why not use endl?
Anonymous
I didn't watch the whole video, just read the title ;P
klimi
Oh
Anonymous
It said something about not using endl
klimi
That's your answer to confusion
Anonymous
Feeling too lazy right now right😅
Anonymous
And those are of more than 10 minutes length
Mat
They'll be 5 minutes long
Anonymous
Its actually hard sometimes to watch in 2x
Anonymous
After .5x it becomes difficult to get everything
Anonymous
Ajay
I am not havinh writing permission
Dima
it’s not allowed to discuss here
Ajay
Why
Anonymous
How can I tell if a telegram file has a virus before downloading it? 🤔
Daniele°
klimi
but i use linux.... shrug
Daniele°
klimi
Depend on line discipline
im gonna get flamed hard whew
Daniele°
im gonna get flamed hard whew
New line flush buffer on stdout by default in Linux
Daniele°
You can change feature with setvbuf
Daniele°
$ man setvbuf
Ludovic 'Archivist'
Depend on line discipline
It depends of which buffer you are talking about
Ludovic 'Archivist'
For example, new line will not flush the buffer of std::cout, but yes, typically it will flush the process' write buffer (os level)
Ludovic 'Archivist'
^
Not for the std::cout buffer tho
Ludovic 'Archivist'
Depend on line discipline
Only for syscalls
Daniele°
Not for the std::cout buffer tho
std::cout use write insidie
Ludovic 'Archivist'
std::cout use write insidie
It also uses its own buffer inside
Ludovic 'Archivist'
Which is an std::basic_filebuf if I am not mistaken
Ludovic 'Archivist'
Which itself is a std::basic_streambuf I think
Ludovic 'Archivist'
Never so sure of those gears
Daniele°
By default is syncronized
Ludovic 'Archivist'
By default is syncronized
Only flushes are synchonized
Ludovic 'Archivist'
The rest is not guaranteed to be
Daniele°
Only flushes are synchonized
By default have same feature of C with stdout/stdin/stderr
Ludovic 'Archivist'
By default have same feature of C with stdout/stdin/stderr
The standard for C doesn't forbid files to be buffered
Daniele°
http://www.cplusplus.com/reference/ios/ios_base/sync_with_stdio/
Daniele°
The standard for C doesn't forbid files to be buffered
On C Linux stdout is line buffered by default
Ludovic 'Archivist'
On C Linux stdout is line buffered by default
While write (the syscall) is not for the application
Ludovic 'Archivist'
(it is for the OS tho)
Ludovic 'Archivist'
You so have 2 levels of buffering
Daniele°
Ludovic 'Archivist'
Short long story, never make assumptions on at what level stuff may be slices apart