I basically have the following lines of code
void func1(size_t sz1)
{
double arr[sz1];
}
When I use the Microsoft Visual C++ 2019 (C) Compiler, error C2057 is thrown. When I use the MinGW64 Compiler (C), I don't get an error and the code works as expected. Does the MinGW64 Compiler automatically use mallaoc
or why don't I get an error with this Compiler too? Furthermore, do I have to expect any troubles when using the lines of code above instead of malloc
?