assigning pointer within loop

I have a loop in my code which I would like to take an image, make n number of copies and stretch each one to different dimensions
I think it makes the most sense to do it in a for loop such as

1
2
3
4
for(int i=0,int res_y = img->height*scaleratio[i]; i < columns; i++){
IplImage *stretchImg1 = cvCreateImage(cvSize(imgx, res_y), IPL_DEPTH_8U, 3);
cvResize(img, stretchImg1,CV_INTER_LINEAR);
}


However each loop will need to generate a differnt pointer name rather than just naming them all stretchImg1. How can I do this?

what would be really great is if there was a way I could name the variable like "stretchImg(i)" Is this possible?
what would be really great is if there was a way I could name the variable like "stretchImg(i)" Is this possible?

Yes, that's called an array.
Wow, I'm dumb.

I didn't think that would work so I didn't even bother to try.
thanks.
Topic archived. No new replies allowed.