How to code a shape!!

Anyone know how to code a shape?

What i mean is like a shape made of * i know how to do a normal array of * but not a heart, Christmas tree, etc...
You might as well just hard-code it:

1
2
3
4
std::cout << "   *"
std::cout << "  ***"
std::cout << "*****"
std::cout << "   *"


Makes a little Xmas tree.
If there is no easy way to define your shape mathematically that's pretty much the only way.



You might define it as a sequence of shapes (a triangle followed by a vertical line, for instance), but honestly I don't see why bother. There's a lot of more interesting, important stuff you could be learning instead.
anyone have a link to those symbol so i can just copy and paste in the cout instead of ************ ** ****
its not a common task, so i dont believe there are any of those symbols, youre just going to have to write them yourself.
Topic archived. No new replies allowed.