As a part of a uni project I have to create a program which can have an arbitrary amount of threads given as a command line argument. I first tried making a dynamic array of threads like this:
`thread* threads = new thread[numThreads];` ( Note: I want to use the threads class, not pthreads ). I figured it didn't work because to my knowledge new tries to call default constructors to thread, which it doesn't have and lator on I cannot actually construct the threads properly. Then I tried to do it in the following way:

```
thread** threads = new thread*[numThreads];
for (int i = 0; i < numThreads; i++)
    {
        threads[i] = new thread(calculateFractal, width, height, numThreads, i, fractal, xmin, xmax, ymin, ymax, xStepSize, yStepSize, maxNorm);
    }

```

I have defined the function and all of the used variables in the aforementioned constructors in the for are of their appropriate data types:

```
void calculateFractal(int& width, int& height, int& numThreads, int& thisThreadNum, RGB**& fractal, 
    long double& xmin, long double& xmax,long double& ymin, long double& ymax,
    long double& xStepSize, long double& yStepSize, long double& maxNorm)

```

This code still doesn't work and gives the same compiler errors([C2672](https://learn.microsoft.com/en-us/cpp/error-messages/compiler-errors-2/compiler-error-c2672?f1url=https%3A%2F%2Fmsdn.microsoft.com%2Fquery%2Fdev15.query%3FappId%3DDev15IDEF1%26l%3DEN-US%26k%3Dk(C2672)%26rd%3Dtrue&view=vs-2019) and [C2893](https://learn.microsoft.com/en-us/cpp/error-messages/compiler-errors-2/compiler-error-c2893?f1url=https%3A%2F%2Fmsdn.microsoft.com%2Fquery%2Fdev15.query%3FappId%3DDev15IDEF1%26l%3DEN-US%26k%3Dk(C2893)%26rd%3Dtrue&view=vs-2019)) for essentially inappropriate function template as if I have not passed the correct type of arguments. Can you figure out what is wrong with the code?