ofImage + strings

Hi there,
I came across a post, i believe here. The post showed how to use a string to draw an ofImage.
The string worked as a reference to which ofImage to draw.
I hope I’m making sense and that someone can help me
Thanks

Not sure I understand you correctly? You mean you have a string associated with a specific image? so you can do something like draw(“image1”); ?

If so, then you might want to look at std::map http://en.cppreference.com/w/cpp/container/map

std::map<string, ofImage> images;
images["image1].load("pathToSomeImage.jpg");
images["image2].load("pathToAnother");

images["image1].draw();

thats great, thanks!