Click here to Skip to main content
14,976,689 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: error C3861: 'major': identifier not found Pin
Victor Nijegorodov7-Jan-20 0:40
MemberVictor Nijegorodov7-Jan-20 0:40 
GeneralRe: error C3861: 'major': identifier not found Pin
_Flaviu7-Jan-20 1:07
Member_Flaviu7-Jan-20 1:07 
GeneralRe: error C3861: 'major': identifier not found Pin
Victor Nijegorodov7-Jan-20 1:13
MemberVictor Nijegorodov7-Jan-20 1:13 
AnswerRe: error C3861: 'major': identifier not found Pin
Stefan_Lang8-Jan-20 21:58
mveStefan_Lang8-Jan-20 21:58 
GeneralRe: error C3861: 'major': identifier not found Pin
_Flaviu8-Jan-20 22:04
Member_Flaviu8-Jan-20 22:04 
GeneralRe: error C3861: 'major': identifier not found Pin
Stefan_Lang8-Jan-20 22:40
mveStefan_Lang8-Jan-20 22:40 
Questionsetw irrational behaviour Pin
Vaclav_5-Jan-20 8:25
MemberVaclav_5-Jan-20 8:25 
AnswerRe: setw irrational behaviour Pin
k50545-Jan-20 10:27
mvek50545-Jan-20 10:27 
You do know that left applies to the output stream until its changed with either right or internal, don't you?

Anyway, the only odd thing I can see is this bit
INITIALIZE bold red text
                                           (offset 30 ) START PARENT PROCESS
Your code is:
cout << setw(75) << left
     << "\033[1;31mINITIALIZE bold red text\n" << flush;
cout << flush;
cout << setw(75) << left << "(offset 30 ) START PARENT PROCESS "
     << endl;
In that first line, you have a terminating \n, so the output stream sends your text, including the line terminator, then fills the output so that 75 chars are actually written, since the cout string is 32 chars long, you get an additional 43 spaces to make up the output width before the next cout. Remove the terminating \n and add a << endl.

Otherwise, it all looks good to me. Changing the width to 35 seems to do the right thing, and removing the left right-justifies the output, which I think is correct, so I'm not sure what you're seeing that's wrong. Maybe give us an example of what output you get when it seems incorrect to you, please.
GeneralRe: setw irrational behaviour Pin
Vaclav_5-Jan-20 17:37
MemberVaclav_5-Jan-20 17:37 
GeneralRe: setw irrational behaviour Pin
Richard MacCutchan5-Jan-20 21:53
mveRichard MacCutchan5-Jan-20 21:53 
GeneralRe: setw irrational behaviour Pin
k50546-Jan-20 4:16
mvek50546-Jan-20 4:16 
AnswerRe: setw irrational behaviour Pin
CPallini6-Jan-20 21:30
mveCPallini6-Jan-20 21:30 
Questionerror C2065: '_S_IFDIR' : undeclared identifier Pin
_Flaviu5-Jan-20 7:42
Member_Flaviu5-Jan-20 7:42 
AnswerRe: error C2065: '_S_IFDIR' : undeclared identifier Pin
k50545-Jan-20 10:31
mvek50545-Jan-20 10:31 
AnswerRe: error C2065: '_S_IFDIR' : undeclared identifier Pin
Richard MacCutchan5-Jan-20 21:28
mveRichard MacCutchan5-Jan-20 21:28 
QuestionC++ control textBox of Form1 and Form2 Pin
HeeMongKorea29-Dec-19 20:08
professionalHeeMongKorea29-Dec-19 20:08 
AnswerRe: C++ control textBox of Form1 and Form2 Pin
Richard MacCutchan29-Dec-19 22:02
mveRichard MacCutchan29-Dec-19 22:02 
AnswerRe: C++ control textBox of Form1 and Form2 Pin
Victor Nijegorodov30-Dec-19 0:37
MemberVictor Nijegorodov30-Dec-19 0:37 
QuestionAbstract Factory Design/Linked List Problem Pin
EjireK28-Dec-19 4:59
MemberEjireK28-Dec-19 4:59 
AnswerRe: Abstract Factory Design/Linked List Problem Pin
Richard MacCutchan28-Dec-19 5:51
mveRichard MacCutchan28-Dec-19 5:51 
GeneralRe: Abstract Factory Design/Linked List Problem Pin
EjireK28-Dec-19 6:14
MemberEjireK28-Dec-19 6:14 
GeneralRe: Abstract Factory Design/Linked List Problem Pin
Richard MacCutchan28-Dec-19 6:29
mveRichard MacCutchan28-Dec-19 6:29 
GeneralRe: Abstract Factory Design/Linked List Problem Pin
EjireK28-Dec-19 12:18
MemberEjireK28-Dec-19 12:18 
GeneralRe: Abstract Factory Design/Linked List Problem Pin
leon de boer28-Dec-19 14:53
Memberleon de boer28-Dec-19 14:53 
GeneralRe: Abstract Factory Design/Linked List Problem Pin
Richard MacCutchan28-Dec-19 21:49
mveRichard MacCutchan28-Dec-19 21:49 

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.