It seems to work with string itself as argument but not with modified string object as argument.
I really don’t know why.
ofImage a = ofImage("streetViewMap_37.734612_-122.508373.jpg");
cout << "this works!!!!!!" << endl;
ofBuffer file = ofBufferFromFile("cityData");
while (!file.isLastLine()) {
vector <string> values = ofSplitString(file.getNextLine(), ",");
string imagePath = "streetViewMap_"
+ values[0]
+ "_"
+ values[1]
+".jpg";
cout << (imagePath) << endl; // it actually generate correct image file name.
imageData[id] = ofImage(imagePath); // id will increase, I just took out the script for this part. this part says error msg below.
}
[ error ] ofImage: loadImage(): couldn’t load image from “streetViewMap_37.741412_-122.507873.jpg”
Thank you!