title: identifiers srand(), rand(), and time() not recognized
body: <p>I'm just starting coding C++ in VSCode and am having trouble with using <code>rand(time(0));</code> in any of my C++ programs. I have been working through a textbook for C++ and this is the first program to need <code>#include &lt;cstdlib&gt;</code>. I think this means it's an issue with my library, but I don't know how to go about fixing it. Any help on what I did wrong would be great.</p>
  
  <p>Whenever i try to use <code>srand();</code>, <code>rand()</code>, or <code>time()</code> the intellisense says <code>identifier 'rand' is undefined</code> or similar for the other two function calls.<br>
  I'm including <code>&lt;cstdlib&gt;</code> and <code>&lt;ctime&gt;</code> and <code>using namespace std;</code> in my  programs.<br>
  here's an example of my test case code saved as "rand test.cpp" in my workspace folder. </p>
  
  <pre><code>#include &lt;cstdlib&gt;
  #include &lt;iostream&gt;
  #include &lt;ctime&gt;
  using namespace std;
  
  int main(){
      srand(time(0));
      int x = rand() % 10;
      cout&lt;&lt;x&lt;&lt;endl;
      return 0;
  }
  </code></pre>
  
  <p>When I try to build the test program with the C/C++ Compile Run extension, the Compile &amp; Run terminal spits out something similar to this:  </p>
  
  <pre><code>PS C:\Users\Noah\Documents\Coding Resume&gt; &amp; g++ -st d=c++17 -Wall -Wextra 'c:\Users\Noah\Documents\Coding Resume\rand test.cpp' -o 'c:\Users\Noah\Documents\Coding Resume\rand test'
  c:\Users\Noah\Documents\Coding Resume\rand test.cpp: In function 'int main()':
  c:\Users\Noah\Documents\Coding Resume\rand test.cpp:7:11: error: too few arguments to function 'void sPS C:\Users\Noah\Documents\Coding Resume&gt; &amp; 'c:\Users\Noah\Documents\Coding Resume\rand test 
  1`
  </code></pre>
  
  <p>my c_cpp_properties.json looks like this</p>
  
  <pre><code>{
  "configurations": [
      {
          "name": "Win32",
          "includePath": [
              "${workspaceFolder}/**",
              "C:\\MinGW\\lib\\gcc\\mingw32\\6.3.0\\include\\c++",
              "C:/MinGW/lib/gcc/mingw32/6.3.0/include/c++/mingw32",
              "C:/MinGW/lib/gcc/mingw32/6.3.0/include/c++/tr1",
              "C:/MinGW/include",
              "C:/MinGW/lib/gcc/mingw32/6.3.0/include"
          ],
          "defines": [
              "_DEBUG",
              "UNICODE",
              "_UNICODE"
          ],
          "compilerPath": "C:\\MinGW\\bin\\gcc.exe",
          "cStandard": "c11",
          "cppStandard": "c++17",
          "intelliSenseMode": "clang-x64"
      }
  ],
  "version": 4
  </code></pre>
  
  <p>}</p>
  
  <p>for the original code I used when this problem popped up was:</p>
  
  <pre><code>    //checking randomness on a die
  #include &lt;cstdlib&gt;
  #include &lt;iostream&gt;
  #include &lt;iomanip&gt;
  using namespace std;
  
  int main()
  {
      int f, f1, f2, f3, f4, f5, f6;
      f = 0;
      f1 = 0;
      f2 = 0;
      f3 = 0;
      f4 = 0;
      f5 = 0;
      f6 = 0;
  
      for (int r = 1; r &lt;= 6000; r++)
      {
          f = rand();
          f++;
          f = f % 6;
          switch (f)
          {
          case 1:
              f1++;
              break;
          case 2:
              f2++;
              break;
          case 3:
              f3++;
              break;
          case 4:
              f4++;
              break;
          case 5:
              f5++;
              break;
          case 6:
              f6++;
              break;
          default:
              cout &lt;&lt; "something went wrong in the roller\n";
              break;
          }
          cout &lt;&lt; "Face" &lt;&lt; setw(13) &lt;&lt; "Frequency" &lt;&lt; endl
               &lt;&lt; "1" &lt;&lt; setw(13) &lt;&lt; f1 &lt;&lt; endl
               &lt;&lt; "2" &lt;&lt; setw(13) &lt;&lt; f2 &lt;&lt; endl
               &lt;&lt; "3" &lt;&lt; setw(13) &lt;&lt; f3 &lt;&lt; endl
               &lt;&lt; "4" &lt;&lt; setw(13) &lt;&lt; f4 &lt;&lt; endl
               &lt;&lt; "5" &lt;&lt; setw(13) &lt;&lt; f5 &lt;&lt; endl
               &lt;&lt; "6" &lt;&lt; setw(13) &lt;&lt; f6 &lt;&lt; endl
               &lt;&lt; endl;
  
          return 0;
      }
  }
  //Expected output
  /*
  Face    Frequency
  1       '~1000'
  2       '~1000'
  3       '~1000'
  4       '~1000'
  5       '~1000'
  6       '~1000'
  */
  //Actual output
  /*
  something went wrong in the roller
  Face    Frequency
  1            0
  2            0
  3            0
  4            0
  5            0
  6            0
  */
  </code></pre>
  
  <p>Thanks for the help.</p>