Please HELP :( error AudioParameterChoice

I’m new to juce so now I’m follwing this video,

I think I did the same with this video but I’ve getting this compling errors.

‘juce::AudioParameterChoice::AudioParameterChoice(const juce::String &,const juce::String &,const juce::StringArray &,int,const juce::String &,std::function<juce::String (int,int)>,std::function<int (const juce::String &)>)’: cannot convert argument 3 from ‘_Ty’ to 'const juce::StringArray &'

I’m not sure why I got this error.

Please show the code you’re using to construct the AudioParameterChoice. At a guess you probably did something like { "On", "Off" } for your choices parameter and you’ll solve it by putting juce::StringArray { "On", "Off" } there instead. My assumption is that the compiler can’t implicitly decide what type you’re giving, so explicitly stating it would solve the issue. Complete guesswork though without your code.

juce::AudioProcessorValueTreeState::ParameterLayout TapSynthAudioProcessor::createParams()
{
std::vector<std::unique_ptr<juce::RangedAudioParameter >> params;

// OSC 

params.push_back(std::make_unique<juce::AudioParameterChoice>("OSC", "Oscillator", juce::StringArray{ "Sine" , "Saw" , "Square" }, 0));

Here is my code, thanks for replying, I use VS in window btw

EDIT: I changed like this but I haven’t resloved yet

Seems to be correct, basically the same as I have used AudioParameterChoice myself without issue before, so I’m not sure where your error is coming from. :frowning:

This is the part of my code.

juce::AudioProcessorValueTreeState::ParameterLayout TapSynthAudioProcessor::createParams()
{
std::vector<std::unique_ptr<juce::RangedAudioParameter >> params;

params.push_back(std::make_unique<juce::AudioParameterChoice>("OSC", "Oscillator", juce::StringArray{ "Sine", "Saw", "Square" }, 0));

Here I bring detailed error logs

Reason: cannot convert from ‘_Ty’ to ‘const juce::StringArray’
No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called

I checked the error and this code appeared. It was in the External Dependencies/memory

template <class _Ty, class… _Types, enable_if_t<!is_array_v<_Ty>, int> = 0>
_NODISCARD unique_ptr<_Ty> make_unique(_Types&&… _Args) { // make a unique_ptr
return unique_ptr<_Ty>(new _Ty(_STD forward<_Types>(_Args)…));
}

I haven’t gotten anything about why this conversion failed. Is it related with my coding setting? Do I have to install other extension packs or something?