Header file which allows variable length arrays in c++

Revision en3, by Original_Batman, 2018-08-31 11:32:56
#include<bits/stdc++.h>

using namespace std;

int main()
{
   int n;
   cin >> n;
   int arr[n];           //Variable length array
   return 0;
}

Hey there, I've seen many people use variable length array in their programs but the problem is I program on Visual Studio and it doesn't allow me to use #include<bits/stdc++.h>. So I wanted to know which particular header file allows us to have variable length arrays.

Tags #array

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en3 English Original_Batman 2018-08-31 11:32:56 36
en2 English Original_Batman 2018-08-31 11:32:14 175
en1 English Original_Batman 2018-08-31 11:31:19 461 Initial revision (published)