Alot of weird stuff is in your code. I think you should not use recursive functions until you have a solid understanding of how all programming systems works (not to be harsh). Stick with for loops.
1 2 3 4 5 6
int dot_count = 8;
for(int y = 0; y < dot_count; ++y){
for(int x = 0; x < y; ++x)
std::cout<<" ";
std::cout<<".\n";
}