I think your problem is in this code:
X-- is a statement. It decrements (takes one away from) X. Every time the for loop finishes, it checks if the expression ( FinalDrawVar<(X--) ) evaluates to true, and if it does it repeats the loop. Every time this expression is evaluated, it decrements X.Code:for(FinalDrawVar=1; FinalDrawVar<(X--);FinalDrawVar++){ cout<<"*"; //draw the spaces }//End FinalDrawVar loop
So all you have to do is change X-- to X-1, and it should work.




Reply With Quote