When you post code, please could you use [code] tags. I should have mentioned this in post #7. Click Go Advanced, select code then click '#'. A couple of pointers.

Code:
cout << symbol << string(i, " ") << endl;
With string() you are trying to create a string of i spaces. However, this will give a compiler error as the space needs to be in single quotes for a character rather than double quotes for a string. Also cout prints from left to right. So you are first printing the symbol and then printing a number of spaces and then a new line!!