I'm sure there are a lot of better answers than mine, just wanted to let you see it:
// i will be the limit to finish the recursion
// j will be the limit to paint the line
void triangle(int i, int j){
if(j < i){ // If the limit has not been reached
for(int a = 0; a < j; a++)
cout << "*";
cout << endl;
triangle(i, j + 1); // Recall the function with line limit increased