I'm just trying to glob everything in a directory and print the list of results, but I get an empty printf:
#include <glob.h>
#include <stdio.h>
int main()
{
int result;
glob_t buffer;
buffer.gl_offs = 10;
glob("*", GLOB_DOOFFS, NULL, &buffer);
printf((char*)buffer.gl_pathv);
}
What does work is
printf("%i", buffer.gl_pathc));