title: Sorting a C-style array
body: <p>I'm stuck on one part of my assignment. I'm not sure what C-style array exactly is. When I sort a normal array, the sort function works. However, I get a red squiggly in my code where I try to sort the C-style array. Is there something that I'm doing wrong? Would appreciate any help. Thanks in advance. </p>
  
  <pre><code>// Goal: To populate a C-style array of 40 million elements with random values between 
      //          1 and 4 billion and then sort via sort() algorithm. Note that you should use the new 
      //          operator to allocate the array.
  
      // NOTE: The array is created/initialized with with 40 million elements using new operator.
  
      start_time = time(NULL); // record start time
  
      {
  
          size_t *a1 = new size_t[forty_million];
  
          for (int i = 0; i &lt; forty_million; ++i)
          {
              a1[i] = randomInt(engine);
          }
  
          sort(a1.begin(), a1.end());
  
      }
  
      end_time = time(NULL); // record end time
      total_time = end_time - start_time; // calculate time to compute
      cout &lt;&lt; "It took " &lt;&lt; static_cast&lt;long&gt;(total_time) &lt;&lt; " seconds to compute Part " &lt;&lt; part++ &lt;&lt; "\n" &lt;&lt; endl;
  </code></pre>