Click here to Skip to main content
14,490,063 members

C / C++ / MFC

 
GeneralRe: cout in color and perror - revisited Pin
Vaclav_21-Dec-19 9:05
MemberVaclav_21-Dec-19 9:05 
GeneralRe: cout in color and perror - revisited Pin
Richard MacCutchan21-Dec-19 21:25
mveRichard MacCutchan21-Dec-19 21:25 
QuestionHow to close file in C++? Pin
Vaclav_19-Dec-19 17:13
MemberVaclav_19-Dec-19 17:13 
QuestionRe: How to close file in C++? Pin
CPallini19-Dec-19 21:35
mveCPallini19-Dec-19 21:35 
AnswerRe: How to close file in C++? Pin
Stefan_Lang19-Dec-19 21:59
mveStefan_Lang19-Dec-19 21:59 
AnswerRe: How to close file in C++? Pin
Vaclav_20-Dec-19 4:51
MemberVaclav_20-Dec-19 4:51 
AnswerRe: How to close file in C++? Pin
Richard MacCutchan19-Dec-19 21:56
mveRichard MacCutchan19-Dec-19 21:56 
QuestionDo "setw(offset) " BEFORE cout ? Pin
Vaclav_18-Dec-19 4:22
MemberVaclav_18-Dec-19 4:22 
OK, I can do search and replace "cout<<" with "cout<< setw(offset)<< "
to shift the output start column to console at offset.

BUT

anybody has an idea / hack how to PRESET "cout" ?




<pre>	int offset = 10;

	setw(offset);            // preset to offset , but this does not work , obviously 

	cout << setw(offset ) << "Test " <<  endl;
	cout << setw(offset ) << "Test " <<  endl;
	cout << setw(offset ) << "Test " <<  endl;

	offset += 10;
	cout << setw(offset ) << "Test " <<"  space " << "Test " <<  endl;
	cout << setw(offset ) << "Test " <<"  space " << "Test " <<  endl;
	cout << setw(offset ) << "Test " <<"  space " << "Test " <<  endl;
	cout << setw(offset ) << "Test " <<"  space " << "Test " <<  endl;



AnswerRe: Do "setw(offset) " BEFORE cout ? Pin
Richard MacCutchan18-Dec-19 4:56
mveRichard MacCutchan18-Dec-19 4:56 
AnswerRe: Do "setw(offset) " BEFORE cout ? Pin
leon de boer18-Dec-19 5:19
Memberleon de boer18-Dec-19 5:19 
GeneralRe: Do "setw(offset) " BEFORE cout ? Pin
Vaclav_19-Dec-19 17:26
MemberVaclav_19-Dec-19 17:26 
GeneralRe: Do "setw(offset) " BEFORE cout ? Pin
Richard MacCutchan19-Dec-19 21:50
mveRichard MacCutchan19-Dec-19 21:50 
AnswerRe: Do "setw(offset) " BEFORE cout ? Pin
CPallini18-Dec-19 10:43
mveCPallini18-Dec-19 10:43 
GeneralRe: Do "setw(offset) " BEFORE cout ? Pin
Vaclav_19-Dec-19 17:14
MemberVaclav_19-Dec-19 17:14 
QuestionLoadString Pin
Member 1450258316-Dec-19 23:36
MemberMember 1450258316-Dec-19 23:36 
AnswerRe: LoadString Pin
Daniel Pfeffer16-Dec-19 23:44
professionalDaniel Pfeffer16-Dec-19 23:44 
AnswerRe: LoadString Pin
Richard MacCutchan16-Dec-19 23:47
mveRichard MacCutchan16-Dec-19 23:47 
QuestionLoadImage Failure Pin
ForNow15-Dec-19 14:17
MemberForNow15-Dec-19 14:17 
AnswerRe: LoadImage Failure Pin
leon de boer15-Dec-19 20:30
Memberleon de boer15-Dec-19 20:30 
GeneralRe: LoadImage Failure Pin
ForNow16-Dec-19 1:25
MemberForNow16-Dec-19 1:25 
GeneralRe: LoadImage Failure Pin
leon de boer16-Dec-19 4:07
Memberleon de boer16-Dec-19 4:07 
GeneralRe: LoadImage Failure Pin
ForNow16-Dec-19 4:36
MemberForNow16-Dec-19 4:36 
GeneralRe: LoadImage Failure Pin
leon de boer16-Dec-19 22:35
Memberleon de boer16-Dec-19 22:35 
GeneralRe: LoadImage Failure Pin
Richard MacCutchan15-Dec-19 21:36
mveRichard MacCutchan15-Dec-19 21:36 
Questionproblem when run the application using cntrl+F5. Wintech OPC DLL Pin
Member 1467670615-Dec-19 0:52
MemberMember 1467670615-Dec-19 0:52 

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.