Quote:
Originally Posted by bruflot 
blaaaah.. Knowing that my code wasn't made correctly was driving me nuts, so here I am, once again
Does this look better to you? Warning: Spoiler! (Click to show)

blaaaah.. Knowing that my code wasn't made correctly was driving me nuts, so here I am, once again

Does this look better to you? Warning: Spoiler! (Click to show)
Code:
void OCN1(int input){
int i = input;
string chr = "*";
for(int p = 0; p < input; p++){
cout << chr << endl;
chr += "*";
}
for(int m = input; (m = input); i--){
cout << chr << endl;
chr.erase(i);
}
}
Let's continue this here.
The part up till the first loop looks fine.
The second loop will not work correctly because the second argument you have given (m = input) is not a boolean condition. Also, even if it were correctly written (m == input), you haven't iterated or changed the value of m in anyway throughout the execution of the loop so the loop would run infinitely.
I see what you're trying to do with multiple variables in the loop. If you just fix what's wrong with 'm', i.e., fix the condition (m > 0) and add in code in the loop that decreases its value by one, it should work properly.
Sorry for confusing you a bit in the PM.















