Click here to Skip to main content
15,911,711 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: simple string concatenation question Pin
Nick Parker6-Apr-03 17:28
protectorNick Parker6-Apr-03 17:28 
GeneralRe: simple string concatenation question Pin
J.B.7-Apr-03 1:27
J.B.7-Apr-03 1:27 
GeneralRe: simple string concatenation question Pin
anju6-Apr-03 17:38
anju6-Apr-03 17:38 
GeneralRe: simple string concatenation question Pin
Michael Dunn6-Apr-03 17:56
sitebuilderMichael Dunn6-Apr-03 17:56 
GeneralRe: simple string concatenation question Pin
J.B.6-Apr-03 18:40
J.B.6-Apr-03 18:40 
GeneralRe: simple string concatenation question Pin
Anders Molin7-Apr-03 0:09
professionalAnders Molin7-Apr-03 0:09 
GeneralRe: simple string concatenation question Pin
Brian Shifrin8-Apr-03 14:17
Brian Shifrin8-Apr-03 14:17 
QuestionHistogram question... reworded... help? Pin
Sheshi6-Apr-03 16:14
Sheshi6-Apr-03 16:14 
I'm struggling on this one... appreciate any hints you experts can offer.

Just trying to print out a histogram, using asterisks, to show the number of times each number 2-12 was rolled, after 50 rolls. I created the following two loops and cannot get the asterisks to continue to the next line as appropriate

<br />
//calculates max # of rolls per number and sets = to 'max'<br />
max = maximum (frequency, arraySize); <br />
<br />
//outer loop, starts countdown	<br />
for (int countDown = max; countDown >= 0; countDown--)<br />
<br />
//inner loop, goes through 2-12<br />
for (int j = 0; j < (arraySize-2); j++) <br />
	<br />
if (frequency[j+2] <= countDown)<br />
cout << setw(3) << "*" << " ";<br />
			<br />
else<br />
cout << setw(3) << " " << " ";<br />
		<br />
<br />
for (face = 2; face < arraySize; face++)<br />
cout << setw(3) << face << " ";<br />


I tried adding an if statement---> if (j%10 == 0) cout << endl;
doesn't work.

Any suggestions?

Thanks so much! Roll eyes | :rolleyes:

Sheshi
AnswerRe: Histogram question... reworded... help? Pin
Nick Parker6-Apr-03 16:25
protectorNick Parker6-Apr-03 16:25 
GeneralRe: Histogram question... reworded... help? Pin
Sheshi6-Apr-03 16:31
Sheshi6-Apr-03 16:31 
QuestionHow to by-pass a Message to a button? Pin
Aixiteru6-Apr-03 14:44
Aixiteru6-Apr-03 14:44 
QuestionAny suggestions with an app plug-in design? Pin
Harrier6-Apr-03 13:13
Harrier6-Apr-03 13:13 
AnswerRe: Any suggestions with an app plug-in design? Pin
Roger Allen7-Apr-03 1:21
Roger Allen7-Apr-03 1:21 
GeneralDeleteFile Function question Pin
Martin Marvinski6-Apr-03 12:26
Martin Marvinski6-Apr-03 12:26 
GeneralRe: DeleteFile Function question Pin
Anders Molin6-Apr-03 13:31
professionalAnders Molin6-Apr-03 13:31 
GeneralRe: DeleteFile Function question Pin
Nish Nishant6-Apr-03 20:09
sitebuilderNish Nishant6-Apr-03 20:09 
Generalstring copy Pin
act_x6-Apr-03 11:18
act_x6-Apr-03 11:18 
GeneralRe: string copy Pin
Chris Losinger6-Apr-03 11:28
professionalChris Losinger6-Apr-03 11:28 
GeneralRe: string copy Pin
valikac6-Apr-03 15:08
valikac6-Apr-03 15:08 
GeneralBeginner C++ programmer... question on arrays, creating a histogram... Pin
Sheshi6-Apr-03 8:39
Sheshi6-Apr-03 8:39 
GeneralRe: Beginner C++ programmer... question on arrays, creating a histogram... Pin
Nick Parker6-Apr-03 15:15
protectorNick Parker6-Apr-03 15:15 
GeneralRe: Beginner C++ programmer... question on arrays, creating a histogram... Pin
PJ Arends6-Apr-03 21:34
professionalPJ Arends6-Apr-03 21:34 
GeneralToolbar Installation Pin
DuFF6-Apr-03 6:58
DuFF6-Apr-03 6:58 
GeneralRe: Toolbar Installation Pin
Xalon6-Apr-03 9:46
Xalon6-Apr-03 9:46 
GeneralRe: Toolbar Installation Pin
J. Dunlap6-Apr-03 10:45
J. Dunlap6-Apr-03 10:45 

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.