i would like to iterate through different colors. is it possible to store a color names in a vector like bellow
vector<string> color= { "blue","black","white","black","red","black","yellow","black","green","black" };
vector<int> xvalue = {175,175,250,250,325,325,213,213,287,287};
vector<int> yvalue = { 200,200,200,200,200,200,230,230,230,230 };
vector<int> radius = { 40,45,50,45,50,45,50,45,50,45 };
for (int i = 0; i <= 10; ++i) {
Circle *s = new Circle(Point(xvalue[i], yvalue[i]), radius[i]);
s->set_fill_color(Color::color[i]);
sw.attach(*s);
}
and If not, how would i go about storing color.
Last edited on