Asteriks Triangle Nested loop

I've been trying to do this asteriks triangle with nested loop for days and many hours and still no luck. Im using visual studio 2010 and I've been searching the web for clues and everytime I use the cout, anything iostream, const char and more it always fails I'm not sure if its not compatible with Vistual Studios or what is exactly the issue but I'm new to programming so I'm struggling a lot with this and have restarted the program 4 times completely already. My assignment includes only 1 button and a multiline text box. The user only clicks the button and the triangle should appear. When the user clicks the botton a right triangle with one astriks at the top and increasing by one the last row has 8 astriks for example ...

*
**
***
****
*****
******
*******
********

With my current code I'm working on nothing happens at all in the text box and Ive used so many different codes already but the closest I got was only one pathetic "*"

int row, col;


String^value;
value += "*";
for(row = 9; row > 1; row++){ 10.
for(col = 1; col < 9; col--)
value += "\r\n";14.15. }
txtBox->Text += value;
}
}
};
Any input would be greatly appreciated and if by chance someone could also explain the iostream and cout used in visual studio or if its even possible with visual studio 2010 we .
haven't gone over that at all in class yet I've only seen it on the internet trying to search for help. Thank you so much!

Please use code tags in future posts, before you press submit, look down the page you will see Format: <>
click on that and insert you code in between

1
2
3
4
5
6
7
8
9
10
11
12
13

int row, col;


String^value;
value += "*";
for(row = 9; row > 1; row++){ 10.
for(col = 1; col < 9; col--)
value += "\r\n";14.15. }
txtBox->Text += value;
}
}
}; 


Moving on, not sure if what you are trying to achieve is more on GUI focused.
As your code doesn't make much sense to me...i.e. no main, no header files, a {10. after the for loop...so can comment a lot as it could be a module I am not yet familiar with..

However for a triangle, perhaps below thread will set you on course?

http://www.cplusplus.com/forum/beginner/17732/

Topic archived. No new replies allowed.