Lets say i have folder with images and I want to import all of those images with IMG_Load or SDL_LoadBMP no matter what the names of those images are and no matter how many of those images are in that folder. For instance, if I have 10 images in folder "Images" I need to use IMG_Load 10 times, and every time to write name of every single image in IMG_Load function. So if I add another 10 pictures with different names this obviously wont work. So my question is how can I import images from folder with arbitrary amount of those images in it using SDL? So to be precise, is there a way to import those images with integers or array? I mean to sort names of those images ascending and call them by numbers. IMG_Load(1), IMG_Load(2), ...
Asked
Active
Viewed 28 times
0
-
1What did you try so far? – Dirk Horsten Dec 11 '15 at 18:40
-
I renamed images in folder with "1", "2", "3".... It works but its just pathetic. Just extremely pathetic :D – Sudden Dec 11 '15 at 19:03
-
1So essentially you're asking how to get the names of all files in a directory, am I right? – Emil Laine Dec 11 '15 at 19:42
-
1Yes. I do realise now that is what Im asking and it has already quite a few answers. Sorry – Sudden Dec 11 '15 at 19:49