When I put in a number greater than around 100,000, the program performs an illegal operation and gets shut down. Is there any way I can allocate more memory for the array that seems to be causing the problem?Code:void determinePrimes(int maxPrime) { int numPrimes = 0, *primes = new int[1.01 * (maxPrime / (log(maxPrime) - 1))]; for (int j = 3; j <= maxPrime; j += 2) if (isPrime(j, primes)) primes[++numPrimes] = j; delete[] primes; } inline bool isPrime(int number, int *primes) { int biggestTest = sqrt(number) + 1; for (int j = 0; primes[j] <= biggestTest; ++j) if (number % primes[j] == 0) return 0; return 1; }