Question

I'm making a game with C++/SFML on a windows platform(7). I have saving and loading down but currently if you want to load a world you must type the name of the folder that world is saved in exactly. My goal is to have the game display a list of the folders within the "saves" directory and have the player select one, loading the correct world. What I need help with is the displaying the folders part, How would i search the "saves" directory and then get the names of all the folders in there, all I need is the name of all the folders.

if its necessary, or would help, here is my current build:

https://docs.google.com/file/d/0BwIyLLkXSiakSUxuM2FpWGhUdGc/edit

click: file->download, or ctrl+s, to download

Was it helpful?

Solution

In Windows, you can use the FindFirstFile() and FindNextFile() API functions.

http://msdn.microsoft.com/en-us/library/windows/desktop/aa365200%28v=vs.85%29.aspx

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top