Read images from database

Hello,
I have a database of images and I want to store paths of all those images to a text file (lets say "images.txt"). I can then use this text file in c++ to extract images one by one by using getline() in a loop.

I don't know how to store image paths to a text file. Please suggest a way...

Thanks in advance :)
1
2
3
4
5
std::ofstream out("images.txt");
while (/*There is images to store*/) {
    //presuming that path variable stores path to current file:
    out << path << std::endl;
}
@MiiNiPaa

thanks for replying! just one question....what does "out" do in last line?

got it! out is an object :)
how do i loop over all images in the database?? how does variable "path" get the actual path??

thanks...
Topic archived. No new replies allowed.