How do I get an array of files in a directory?

I probably should put a more complete error in there. I edited my question. The error is actually in the Array class. Apparently, the array can’t access the private constructor of the FXmlFile object. Pointers will work, but then I just have an array of dangling pointers when the loop ends because the FXmlFile goes out of scope on every iteration.

Yep, file path is correct. I tested a known path just to be sure.

The EConstructMethod would let me put a string of XML into the constructor rather than a file, but that’s not what I need.

I gave the constructor without arguments thing a go but that doesn’t really work either. If I use the new keyword, as in FXmlFile* xmlFile = new FXmlFile();, then I’m left with the pointer problem again. If I don’t use the new keyword, then I’m left with the same error, C2248.

I appreciate the suggestions anyway.