Click here to Skip to main content
14,266,139 members

C / C++ / MFC

 
AnswerRe: C code for fourth degree polynomials Pin
leon de boer12-Mar-19 3:56
memberleon de boer12-Mar-19 3:56 
QuestionUnexpected sequence of cout / perror in console output Pin
Vaclav_10-Mar-19 7:23
memberVaclav_10-Mar-19 7:23 
AnswerRe: Unexpected sequence of cout / perror in console output Pin
Richard MacCutchan10-Mar-19 22:52
protectorRichard MacCutchan10-Mar-19 22:52 
GeneralRe: Unexpected sequence of cout / perror in console output Pin
k505411-Mar-19 2:28
memberk505411-Mar-19 2:28 
GeneralRe: Unexpected sequence of cout / perror in console output Pin
Richard MacCutchan11-Mar-19 3:56
protectorRichard MacCutchan11-Mar-19 3:56 
GeneralRe: Unexpected sequence of cout / perror in console output Pin
k505411-Mar-19 5:41
memberk505411-Mar-19 5:41 
GeneralRe: Unexpected sequence of cout / perror in console output Pin
Richard MacCutchan11-Mar-19 5:52
protectorRichard MacCutchan11-Mar-19 5:52 
GeneralRe: Unexpected sequence of cout / perror in console output Pin
k505411-Mar-19 11:59
memberk505411-Mar-19 11:59 
Only thing I can think of ATM is that the OP is running the code inside whatever terminal his IDE provides, and that's doing something odd with termio settings. I've tried messing with setvbuf() and various stty options, but always get interleaved output.

That being said, it should be pointed out to the OP that stdout (cout) and stderr (cerr), are different output streams. If you take my code and remove the << endl from line 9, then the output is quite different!
GeneralRe: Unexpected sequence of cout / perror in console output Pin
leon de boer11-Mar-19 18:10
memberleon de boer11-Mar-19 18:10 
QuestionC Programming[Solved] Pin
Evolt_Pratom9-Mar-19 1:07
memberEvolt_Pratom9-Mar-19 1:07 
AnswerRe: C Programming Pin
Richard MacCutchan9-Mar-19 1:27
protectorRichard MacCutchan9-Mar-19 1:27 
GeneralRe: C Programming Pin
k50549-Mar-19 4:27
memberk50549-Mar-19 4:27 
GeneralRe: C Programming Pin
Richard MacCutchan9-Mar-19 5:16
protectorRichard MacCutchan9-Mar-19 5:16 
GeneralRe: C Programming Pin
Evolt_Pratom10-Mar-19 3:42
memberEvolt_Pratom10-Mar-19 3:42 
GeneralRe: C Programming Pin
Richard MacCutchan10-Mar-19 7:02
protectorRichard MacCutchan10-Mar-19 7:02 
Questiontemplate confusion Pin
Rw2377-Mar-19 13:00
memberRw2377-Mar-19 13:00 
AnswerRe: template confusion Pin
Rw2378-Mar-19 2:37
memberRw2378-Mar-19 2:37 
GeneralRe: template confusion Pin
Richard MacCutchan8-Mar-19 4:01
protectorRichard MacCutchan8-Mar-19 4:01 
GeneralRe: template confusion Pin
Victor Nijegorodov8-Mar-19 6:21
memberVictor Nijegorodov8-Mar-19 6:21 
GeneralRe: template confusion Pin
Rw2379-Mar-19 6:08
memberRw2379-Mar-19 6:08 
GeneralRe: template confusion Pin
k50548-Mar-19 6:50
memberk50548-Mar-19 6:50 
GeneralRe: template confusion Pin
Rw2379-Mar-19 5:57
memberRw2379-Mar-19 5:57 
QuestionAero snap with CDockablePane Pin
jung-kreidler7-Mar-19 3:51
memberjung-kreidler7-Mar-19 3:51 
AnswerRe: Aero snap with CDockablePane Pin
_Flaviu12-Mar-19 22:49
member_Flaviu12-Mar-19 22:49 
GeneralRe: Aero snap with CDockablePane Pin
jung-kreidler12-Mar-19 23:31
memberjung-kreidler12-Mar-19 23:31 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.