Initialize const int sz = copy_wav_v;
to set my size of name_wav[sz]
but its keep error
error C2057: expected constant expression
//some code
if(char_chck >= 7 && character != 13)
{
copy_wav[copy_wav_v] = Readfile[i];
copy_wav_v++;
// wav_n->Text=System::Convert::ToString(copy_wav_v);
}
if(character == 13)
{
// const int sz = System::Convert::ToInt32(wav_n->Text);
const int sz = copy_wav_v;
char name_wav[sz]; //error starts here
for(int j = 0; j<=copy_wav_v;j++)
{
name_wav[j] = copy_wav[j];
if(j==copy_wav_v)
{
wav_name->Text= gcnew String(name_wav);
}
}
}
//some code
I am currently making a Soundboard System with Windows Form Application.