Click here to Skip to main content
14,455,062 members

C / C++ / MFC

 
GeneralRe: IRichEditOle::InsertObject shifts text one byte Pin
ForNow22-Dec-19 6:09
MemberForNow22-Dec-19 6:09 
GeneralRe: IRichEditOle::InsertObject shifts text one byte Pin
Richard MacCutchan22-Dec-19 23:20
communityengineerRichard MacCutchan22-Dec-19 23:20 
GeneralRe: IRichEditOle::InsertObject shifts text one byte Pin
ForNow23-Dec-19 2:04
MemberForNow23-Dec-19 2:04 
GeneralRe: IRichEditOle::InsertObject shifts text one byte Pin
Richard MacCutchan23-Dec-19 3:03
communityengineerRichard MacCutchan23-Dec-19 3:03 
QuestionCASE SOLVED AND CLOSED cout and cerr execute out of coded sequence Pin
Vaclav_21-Dec-19 11:13
MemberVaclav_21-Dec-19 11:13 
AnswerRe: SOLVED cout and cerr execute out of coded sequence Pin
Richard MacCutchan21-Dec-19 22:32
communityengineerRichard MacCutchan21-Dec-19 22:32 
AnswerRe: CASE SOLVED AND CLOSED cout and cerr execute out of coded sequence Pin
Richard MacCutchan22-Dec-19 23:55
communityengineerRichard MacCutchan22-Dec-19 23:55 
QuestionSOLVED CASE CLOSED cout in color and perror - revisited Pin
Vaclav_20-Dec-19 5:46
MemberVaclav_20-Dec-19 5:46 
SOLVED CASE CLOSED
Thanks for all the help from the group.
It is much appreciated.

Ask Mrs Google for "Eclipse ANSI" .
The question remains why it works without the 3rd part plug in when the app is crosscompiled.









I hope it will not bother the group if I revisit this , now multiple issue.
1. The attached C++ code DOES NOT execute in expected sequence.
Both perror output in red, which is expected , but out of expected sequence.

2. The setw works as expected.

3. The cout "escape sequence " DOES NOT change color and also outputs the sequence as "control characters".
It works well in crosscomplied code.

The code fails using tools implementing "standard" "hello word" on local machine.

This SAME code works as expected running after the application is crosscompiled for
"remote" machine. And has been working well for few months of development.

As far as I can tell - implementing "control / escape " characters in cout does not require anything special - iostream should work .

	cout << " START test area " << __LINE__ << endl;
	cout << __FUNCTION__ << endl;
	cout << " START test area " << __LINE__ << endl;
	cout << __FUNCTION__ << endl;
	perror("TEST perror ");
	cout << setw(30) << "\033[1;31mbold red text\033[0m\n";
	perror("TEST perror ");
	while(1);

<pre lang="text">
TEST perror : Success             printed in red 
TEST perror : Invalid argument   printed in red 
 START test area 334
main
 START test area 336    
main
     bold red text    shifted , but no color change 


modified 24-Dec-19 10:59am.

AnswerRe: cout in color and perror - revisited Pin
leon de boer20-Dec-19 6:01
Memberleon de boer20-Dec-19 6:01 
GeneralRe: cout in color and perror - revisited Pin
Vaclav_20-Dec-19 6:48
MemberVaclav_20-Dec-19 6:48 
AnswerRe: cout in color and perror - revisited Pin
Richard MacCutchan20-Dec-19 7:07
communityengineerRichard MacCutchan20-Dec-19 7:07 
GeneralRe: cout in color and perror - revisited Pin
Vaclav_21-Dec-19 4:10
MemberVaclav_21-Dec-19 4:10 
GeneralRe: cout in color and perror - revisited Pin
Richard MacCutchan21-Dec-19 4:34
communityengineerRichard MacCutchan21-Dec-19 4:34 
GeneralRe: cout in color and perror - revisited Pin
Vaclav_21-Dec-19 10:05
MemberVaclav_21-Dec-19 10:05 
GeneralRe: cout in color and perror - revisited Pin
Richard MacCutchan21-Dec-19 22:25
communityengineerRichard MacCutchan21-Dec-19 22:25 
QuestionHow to close file in C++? Pin
Vaclav_19-Dec-19 18:13
MemberVaclav_19-Dec-19 18:13 
QuestionRe: How to close file in C++? Pin
CPallini19-Dec-19 22:35
mveCPallini19-Dec-19 22:35 
AnswerRe: How to close file in C++? Pin
Stefan_Lang19-Dec-19 22:59
mveStefan_Lang19-Dec-19 22:59 
AnswerRe: How to close file in C++? Pin
Vaclav_20-Dec-19 5:51
MemberVaclav_20-Dec-19 5:51 
AnswerRe: How to close file in C++? Pin
Richard MacCutchan19-Dec-19 22:56
communityengineerRichard MacCutchan19-Dec-19 22:56 
QuestionDo "setw(offset) " BEFORE cout ? Pin
Vaclav_18-Dec-19 5:22
MemberVaclav_18-Dec-19 5:22 
AnswerRe: Do "setw(offset) " BEFORE cout ? Pin
Richard MacCutchan18-Dec-19 5:56
communityengineerRichard MacCutchan18-Dec-19 5:56 
AnswerRe: Do "setw(offset) " BEFORE cout ? Pin
leon de boer18-Dec-19 6:19
Memberleon de boer18-Dec-19 6:19 
GeneralRe: Do "setw(offset) " BEFORE cout ? Pin
Vaclav_19-Dec-19 18:26
MemberVaclav_19-Dec-19 18:26 
GeneralRe: Do "setw(offset) " BEFORE cout ? Pin
Richard MacCutchan19-Dec-19 22:50
communityengineerRichard MacCutchan19-Dec-19 22:50 

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.