reading in from a list using fgets

i need this solution using "fgets"

i have a folder(3dsimages) of images.
eg. left0000.png
right0000.png
left0001.png
etc. etc.

i have made a text file(imagelist) list of these images with path:
3dsimages/left0000.png
3dsimages/right0000.png
3dsimages/left0001.png

what is the code required (using "fgets") to read "imagelist" and display these images one after another in C/C++.

another thing is why is "/" frontslash accepted when windows paths are always with a backslash. i'm using Visual C++ express 2010.
Last edited on
That's simple reading from file.
1
2
3
while(std::getline(my_file, my_string)){
   LoadAndDraw(my_string);//or my_string.c_str() if you need a const char*.
}
how would it be done using "fgets".
Topic archived. No new replies allowed.