πŸ’¬ Reply by Lojcs

2024-11-20 πŸ”„ programmerhumor ┃ edited ┃ RE: yogthos

Kind of unrelated, why does c sometimes fail to print if it hits a breakpoint right after a print while debugging? Or if it segfaults right after too iirc

Lojcs

yogthos

πŸ”„ programmerhumor

πŸ’¬ Replies

2024-11-21 huf ┃ 1πŸ’¬

does anything flush the buffers after the print, but before the break? otherwise, if the stream you’re printing to is buffered, you’re not necessarily gonna see any output

2024-11-20 joucker29

Im pretty sure its because of char 13 (carriage return). This char sets cursor to the start of the line overwriting whatever was printed there (in most terminals). I belive that some error […]

2024-11-20 targetx

Without knowing the details of C, I’ve seen this in other languages and it’s usually something with missing a flush or a buffered output mode or something like that.

────

View parent post

────

πŸ“‘ Local feed

πŸ•οΈ Communities

πŸ”₯ Hashtags

πŸ”Ž Search posts

πŸ”‘ Sign in

πŸ“Š Status

πŸ›Ÿ Help