Click here to Skip to main content
15,920,053 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralEnable/Disable DirectX Pin
sachinsharma27-Mar-05 17:28
sachinsharma27-Mar-05 17:28 
GeneralIMAGES TO MOVIE file Pin
Emiliano27-Mar-05 14:15
Emiliano27-Mar-05 14:15 
GeneralRe: IMAGES TO MOVIE file Pin
Steve Mayfield27-Mar-05 16:33
Steve Mayfield27-Mar-05 16:33 
QuestionIs my application causing cluster server crash? Pin
adnbsn27-Mar-05 14:14
adnbsn27-Mar-05 14:14 
GeneralNested For Loop Program Pin
bigsing27-Mar-05 13:42
bigsing27-Mar-05 13:42 
GeneralRe: Nested For Loop Program Pin
Yulianto.27-Mar-05 13:57
Yulianto.27-Mar-05 13:57 
GeneralRe: Nested For Loop Program Pin
Ravi Bhavnani28-Mar-05 3:06
professionalRavi Bhavnani28-Mar-05 3:06 
GeneralRe: Nested For Loop Program Pin
bigsing29-Mar-05 14:37
bigsing29-Mar-05 14:37 
This is the code i have so far:

for(int i=0;i<=width;i+=2)
{
cout<<"\n";

for(int j1=0;j1<=(tempwidth/2)-1;j1++)
cout<<" ";

for(int j2=0;j2<=i;j2++)
cout<<"*";

tempwidth--;
}

For an example i am using a width of 13. Through each line of the triangle the amount of spaces before and after the asterisk's are 1 less than the line before it. So by taking the width and dividing it by 2, that chops off the decimal and subtracts one which gives me the right amount of spaces. In my head this code makes sense. But, I am obviously missing something and I just can't seem to figure out what else is needed. Any advice is appreciated.
GeneralCProgressCtrl Question Pin
Joel Holdsworth27-Mar-05 8:45
Joel Holdsworth27-Mar-05 8:45 
GeneralRe: CProgressCtrl Question Pin
Steve Mayfield27-Mar-05 9:19
Steve Mayfield27-Mar-05 9:19 
GeneralRe: CProgressCtrl Question Pin
Joel Holdsworth27-Mar-05 9:58
Joel Holdsworth27-Mar-05 9:58 
GeneralRe: CProgressCtrl Question Pin
Ralph Wetzel27-Mar-05 10:10
Ralph Wetzel27-Mar-05 10:10 
GeneralRe: CProgressCtrl Question Pin
Joel Holdsworth27-Mar-05 12:49
Joel Holdsworth27-Mar-05 12:49 
GeneralRe: CProgressCtrl Question Pin
David Crow28-Mar-05 2:51
David Crow28-Mar-05 2:51 
Questiontemplate bug in vc++6? Pin
nm_11427-Mar-05 7:21
nm_11427-Mar-05 7:21 
AnswerRe: template bug in vc++6? Pin
Joaquín M López Muñoz27-Mar-05 9:36
Joaquín M López Muñoz27-Mar-05 9:36 
GeneralRe: template bug in vc++6? Pin
nm_11427-Mar-05 13:30
nm_11427-Mar-05 13:30 
GeneralArray of Pointers Pin
LighthouseJ27-Mar-05 6:05
LighthouseJ27-Mar-05 6:05 
GeneralRe: Array of Pointers Pin
Gary R. Wheeler27-Mar-05 6:33
Gary R. Wheeler27-Mar-05 6:33 
GeneralRe: Array of Pointers Pin
LighthouseJ27-Mar-05 6:56
LighthouseJ27-Mar-05 6:56 
GeneralRe: Array of Pointers Pin
LighthouseJ27-Mar-05 11:40
LighthouseJ27-Mar-05 11:40 
GeneralRe: Array of Pointers Pin
Axter26-Apr-05 18:07
professionalAxter26-Apr-05 18:07 
GeneralFollow-Up Pin
LighthouseJ27-Mar-05 6:36
LighthouseJ27-Mar-05 6:36 
GeneralRe: Follow-Up Pin
Gary R. Wheeler27-Mar-05 7:01
Gary R. Wheeler27-Mar-05 7:01 
GeneralRe: Array of Pointers Pin
Michael Dunn27-Mar-05 10:41
sitebuilderMichael Dunn27-Mar-05 10:41 

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.