Creating PluginEditor component to select .wav files from a directory

I’m in the process of making a wavetable synthesizer, and I want to implement a combo box that has a list of all the wave files in a directory. I want it to be similar to how Serum does its wavetable select. I’m having a hard time finding relevant resources, so I was hoping to get some guidance here. Here is my current attempts, which is called in the “createParameters()” function passed to the constructor of the APVTS that I’m using:

std::vector<std::unique_ptrjuce::RangedAudioParameter> params;

juce::StringArray wt_names;
wt_names.clear();

// const std::string WT_DIR { “C:\Users\myName\Documents\Xfer\Serum Presets\Tables\Analog” };

for (const auto& filenameThatWasFound : juce::File(WT_DIR).findChildFiles(2, false, “*.wav”)) {
wt_names.add(filenameThatWasFound.getFileNameWithoutExtension());
}

// Oscillator Select
params.push_back(std::make_uniquejuce::AudioParameterChoice(
“_OSC1”, // Parameter ID
“Oscillator 1”, // Parameter name
wt_names, // List of options
0 // Default list index
));

// instantiate the rest of the parameters

Currently, the plugin immediately crashes. Any guidance would be extremely helpful.

The file path doesn’t end up valid on Windows. You need to escape the backslash characters or use a C++ raw string literal, but it’s a bad idea to use that kind of a hardcoded path to begin with. But for testing purposes :

Escaped path:

"C:\\Users\\myName\\Documents\\Xfer\\Serum Presets\\Tables\\Analog"

Or a raw string literal:

R"(C:\Users\myName\Documents\Xfer\Serum Presets\Tables\Analog)"

Sorry, the comment in my code was outdated and WT_DIR is defined properly with double slashes as a private member of the AudioProcessor. To be more specific, here is what pops up when I attempt to build the project:

Here’s another view of the error:
error_pt2

Further update of what’s working and what’s not working. Here’s what I have in my method that I want to read the .wav file, and here’s what works.