I'm trying to create an array of files using al_for_each_fs_entry(), however when I try and index them, it's not longer getting all the files..
Example Code
When this is ran, all files in the "data" folder will print out, however, the moment I uncomment "//fileindex++;" (line 14) it will only print two files and then stop... What am I doing wrong that is causing this?
That shouldn't even compile.
http://liballeg.org/a5docs/trunk/fshook.html#al_for_each_fs_entry
int al_for_each_fs_entry(ALLEGRO_FS_ENTRY *dir, int (*callback)(ALLEGRO_FS_ENTRY *entry, void *extra), void *extra)
This means your 'save_file' function has the wrong function signature.
Here's working example code :
Thanks for the help...
The old code did compile, I promise! I blame either Allegro's exception handler or Visual Studio for allowing my awful code to compile
It has nothing to do with Allegro I assure you. The fault is entirely your compiler's. :/
That is part of why I dislike Visual Studio. I noticed that it allows quite a few problems to slip by without so much as a warning.